home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2003 September / PC Answers September 2003.iso / Software / trial / MonitorIT 5.2.06 / monitorit_fullsetup.exe / data1.cab / Rpm / ViewAlerts.asp < prev    next >
Encoding:
Text File  |  2003-06-24  |  121.7 KB  |  3,255 lines

  1. <html>
  2. <head>
  3. <title>AlertWatch Display</title>
  4.  
  5. <link rel="stylesheet" type="text/css" href="css/rpmstyle.css">
  6. <style>
  7.  
  8. .EventFilter { border-style : solid; border-width : thin; overflow : clip; background-color:white }
  9. .EventFilter { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white}
  10.  
  11. .EventLog { border-style : solid; border-width : thin; overflow : scroll;  background-color:white }
  12. .EventLog { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white}
  13.  
  14. .EventConfig {  overflow : none; background-color:activeborder }
  15. .EventConfig { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white}
  16.  
  17. .VASelectBox { height : 270px; width : 375px; background-color: white; color: infotext; }
  18. .VASelectBox { border-style : solid; border-width : 2px; }
  19. .VASelectBox { border-top-color : #555555; border-left-color : #555555; border-bottom-color : #E0E0E0; border-right-color : #E0E0E0}
  20.  
  21. .VAMainBox { border: none; background-color : activeborder; }
  22.  
  23. .PopUpBox { background-color:activeborder; position:absolute; margin:0; padding:0; border : solid thin; }
  24. .PopUpBox { border-top-color : #E0E0E0; border-left-color : #E0E0E0; border-bottom-color : #555555; border-right-color : #555555 }
  25.  
  26. </style>
  27. </head>
  28.  
  29. <body class="bodyc" style="margin:2px;" language="JavaScript" RPMHostIP="!BreakoutBot:MonitorIP!" RPMHostPort="!BreakoutBot:MonitorPort!" RPMUserName="!BreakoutBot:UserName!" BOBDone="!BreakoutBot:Done!" onload="top.banner.savePageCoord(event,document.body,'ViewAlerts'); InitRpmCC_VA();" onbeforeunload="DiscoRpmCC_VA()" onresize="processSizeChange()" onclick="checkClick()" onkeydown="processBSP()">
  30.  
  31. <script LANGUAGE="JavaScript">
  32. <!--
  33. //border-style : solid; border-width : thin;
  34. var    VAMode = ""; // Mode of Operation, New, Edit, Delete, Lookup, ObjectLookup
  35. var    ALupMode = ""; // Lookup Mode of Operation, Computer, Counter
  36. var   AlertLupRecCount = 0; // Count of records returned from Alert Lookup operation
  37. var   AlertSelectIdx = 0; // Index of currently selected Alert 
  38. var    VA_CommBusy = 0; // Comm busy flag
  39. var    CurObjName = ""; // Current Object Name
  40. var    CurObjID = ""; // Current Object ID
  41. var    CurObjDesc = ""; // Current Object Desc
  42. var    CurCntrName = ""; // Name of Current Open Counter 
  43. var    CurCntrDesc = ""; // Current Counter Description
  44. var    CurCntrID = ""; // Current Counter ID
  45. var    CurAlertID = ""; // Current Alert Name selected in Configure
  46. var    CurAlertName = ""; // Current Alert Group Name selected in Configure
  47. var    CurAlertDesc = ""; // Current Alert Group Description
  48. var   FilterRecCnt = 0; // Count of records in the filter
  49. var    FilterSelectIdx = 0; // Filter Select Index 
  50. var    AudioOutBusy = false; // Flag for AudioOut
  51. var   VA_Tid = null; // AudioOut free timeout
  52. var   Tid = null, CTid= null, ATid= null;
  53. var   ELogWinInit = ""; // save for ElogWin init HTML
  54. var   ELBgFlg = 0; // Alert Event Log Background color toggle
  55. var     bdH = 0;
  56. var     byM = null;
  57. var     borderSz = 2; // Thin Bord is 2pixels
  58. var     ValidateFilter = true; // Validate Alert Filter on entry
  59. var     Hp = null; // Host port
  60. var    ReconnectEvent = false;
  61.  
  62. var     AC_CompStoreArr = new Array();
  63. var   AlertSelectIdx = 0; // Index of currently selected Alert 
  64. var     AlertStoreArr = new Array();
  65. var   AlertLupRecCount = 0; // Count of records returned from Alert Lookup operation
  66.  
  67. var FILE_DELETED =  1;
  68. var FILE_STRING_MATCH =    2;
  69. var FILE_DATE_CHANGE = 4;
  70. var FILE_SIZE_CHANGE = 8;
  71. var FILE_SIZE_MAX = 16;
  72.  
  73. var NOT_RUNNING_NO_RESTART    =    1;
  74. var NOT_RUNNING_RESTARTED    =    2;
  75. var NOT_RUNNING_RESTART_FAILED =    4;
  76. var RUNNING_HALTED    =            8;
  77. var RUNNING_NOT_HALTED    =        16;
  78. var RUNNING_EXCEEDED_CPU    =    32;
  79. var RUNNING_EXCEEDED_MEMORY    =    64;
  80. var RUNNING_EXCEEDED_CPU_HALTED = 128;
  81. var RUNNING_EXCEEDED_MEMORY_HALTED = 256;
  82.  
  83. // Capture and ignore script errors
  84.     window.onerror = wwScrErr;
  85. function wwScrErr() {
  86.     return true;
  87. }
  88.  
  89. /* On Load tell the Comm control to Connect to the Server */
  90. function InitRpmCC_VA() {
  91.     top.MainLoaded = true; // Flag that Main is now loaded
  92.     top.banner.savePageCoord(event,document.body,"ViewAlerts");
  93.  
  94.     byM = 2*parseFloat(document.body.style.margin);
  95.     processSizeChange();
  96.  
  97.     /* Initialize the Calendars Used for Definig Alerts to be Viewed */
  98.     Calendar4 = Calendar_init("Calendar4"); // Start Date calendar
  99.     VA_StartDate.CalObj = Calendar4;
  100.     Calendar5 = Calendar_init("Calendar5"); // Stop Date calendar
  101.     VA_StopDate.CalObj = Calendar5;
  102.     
  103.     /* get Audio Alert checkbox state */
  104.     cc = top.banner.RpmCC_Ban.RegGetKey(top.banner.ServerID+"AudioAlertState"); // get state
  105.     if ( cc == "unchecked" ) { // If not checked 
  106.         AlertAudioEnabled.checked = "";
  107.     }
  108.     else { 
  109.         AlertAudioEnabled.checked == "CHECKED";
  110.     }
  111.       /* Connect to Server and initiate Alert Group Lookup */
  112.     Hp = parseInt(document.body.RPMHostPort,10);
  113.     RpmCC_VA.Connect(document.body.RPMHostIP,Hp, "");
  114. }
  115. function processReconnect() {
  116.     Tid = null;
  117.     if ( RpmCC_VA.IsConnected() ) {
  118.         Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection
  119.         return;
  120.     }
  121.     RpmCC_VA.Connect(document.body.RPMHostIP,Hp, "");
  122. }
  123. function processConnectConfirmed() {
  124.     if ( ReconnectEvent == false ) {
  125.         top.banner.processStartComm(); 
  126.         processVALookupReset(); // go do Alert Lookup
  127.         processLogAndFilterWindows(); // initialize Log and Filter Windows
  128.         ReconnectEvent = true;
  129.     }
  130.     top.Rstatus.Pstat("Connected");
  131.     if ( Tid != null ) {
  132.         clearTimeout(Tid); // stop timeout routine
  133.     }
  134.     Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection
  135. }
  136. function processConnectionCheck() {
  137.     Tid = null;
  138.     RpmCC_VA.SendKeepAlive("Check");
  139.     Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection
  140. }
  141.  
  142. // Process Database Change event
  143. function processDBChanged() {
  144.     CTid = null;
  145.     top.banner.processStartComm(); 
  146.     
  147.     // Insure Configure pop-up is hidden and disabled
  148.    //ConfigButton.className = "BoxButtonD"; // disable button
  149.    ConfigButton.disabled = "disabled"; // disable button
  150.     closeCalendarFields();// close calendar fields if opened
  151.     PopUpDiv.style.display="none";
  152.     goSaveLogEntries();
  153.     
  154.     // Clear Stores
  155.     AlertStoreArr.length=0;
  156.      AC_ServicesStoreArr.length = 0;
  157.     AC_CompStoreArr.length = 0;
  158.     ValidateFilter = true;
  159.     AlertSelectIdx = 0; // Reset Index of currently selected Alert 
  160.     processVALookupReset(); // go do Alert Lookup
  161.     top.Rstatus.StatDB.style.display = "none";
  162.     AL_AlertSel.style.display = "none";
  163. }
  164.  
  165. /* On Unload tell the Comm control to Disconnect from the Server */
  166. function DiscoRpmCC_VA() {
  167.     top.BannerMenuShow();
  168.     RpmCC_VA.Disconnect();
  169.     if (VA_CommBusy == 1) { // stop logo animation if Comm busy flag set
  170.         top.banner.processStopComm();
  171.     }
  172.     closeCalendarFields();// close calendar fields if opened
  173.     
  174.     // Save Audio Alert checkbox state
  175.     cc = ( AlertAudioEnabled.checked == false ) ? "unchecked" : "checked";
  176.     top.banner.RpmCC_Ban.RegSetKey(top.banner.ServerID+"AudioAlertState",cc); // set state
  177.     goSaveLogEntries();
  178.         
  179.     /* Clear AudioOut Timer if set */
  180.     if ( VA_Tid != null ) {
  181.         clearTimeout(VA_Tid);
  182.     }
  183.     if ( Tid != null ) {
  184.         clearTimeout(Tid);
  185.     }
  186.     if ( CTid != null ) {
  187.         clearTimeout(CTid);
  188.     }
  189.     if ( ATid != null ) {
  190.         clearTimeout(ATid);
  191.     }
  192. }
  193. function goSaveLogEntries() {
  194.     /* Redefine Log Time based on Current Time */
  195.     var dob = new Date(); // get current d/t
  196.     var lt = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear();
  197.     lt += " " + dob.getHours() + ":" + dob.getMinutes() + ":" + dob.getSeconds();
  198.     ELogParams.logtime = lt; // update the D/T stamp    
  199.     ELogParams.ELBgFlg = ELBgFlg; // save background flag
  200.     
  201.     /* Save the Log Display, and Filter Display & Store on the Banner Page before exiting */
  202.     top.banner.saveLogDisplay(ELogWin.innerHTML);
  203.     top.banner.saveLogFilter(ELogViewCur.innerHTML);
  204.     AL_AlertSel.innerText = ""; // clear
  205. }
  206.  
  207. // Unconditionally close calendar fields from Configure Filter if open
  208. function closeCalendarFields() {
  209.     if ( VA_calwin.CalState == "1" ) { // if Calendar opended
  210.         processCalendarClick(VA_StartDate); // close it
  211.     }    
  212.       if ( VA_scalwin.CalState == "1" ) { // if Calendar opended
  213.         processCalendarClick(VA_StopDate); // close it
  214.     }
  215. }
  216.  
  217. // Process Display View Size Change
  218. var SCbsy = false;
  219. var PuPW = "500px", PuPWu=500, PuPH = "280px", PuPHu=280, PuPCH = "235px";
  220. var VFilW = "630px"
  221. function processSizeChange() {
  222.     if ( SCbsy ) 
  223.         return;
  224.     SCbsy = true;
  225.     // Display Height and Width
  226.     bCh = document.body.clientHeight;
  227.     bCw = document.body.clientWidth;
  228.  
  229.     // Determine minimums
  230.     bCh = (bCh < bdH+byM+270) ? bdH+byM+270 : bCh;
  231.     bCw = (bCw < PuPWu) ? PuPWu : bCw;
  232.    document.body.scroll = (bCw <= PuPWu || bCh <= bdH+byM+270) ? "yes" : "no";
  233.    
  234.    // Set Height/Widths for Chart and Button areas
  235.     VA_MainBox.style.height = bCh-(bdH+byM-borderSz)-10;
  236.     VA_MainBox.style.width = bCw-byM-4;
  237.     VA_MainBox.style.display = "";
  238.  
  239.     ELogWinFullH = "" + (bCh-TitleDivSize);    
  240.     var ELWinc = (bCh-TitleDivSize-175);
  241.     ELWinc = (ELWinc < 0) ? 0 : ELWinc;
  242.     ELogWinSplitH = "" + ELWinc;    
  243.     ELogWin.style.height = ( ELogViewCurLine.style.display == "none" ) ? ELogWinFullH : ELogWinSplitH;
  244.     
  245.     ELogViewCur.style.width = (bCw-byM-34 > 530) ? "530px" : bCw-byM-34;
  246.  
  247.     //PopUpContext Menu
  248.    PopUpContextSize(bCw);
  249.     
  250.    // PopUp 
  251.    PuPLeft = (bCw-PuPWu)/2;
  252.    PuPTop = (bCh-PuPHu)/2;
  253.    PopUpDiv.style.left = PuPLeft+"px"; 
  254.    PopUpDiv.style.top = "25px";
  255.    PopUpDiv.style.height = (bCh-110);
  256.    PopUpDiv.style.width = PuPW;
  257.    VA_Select.style.height = (bCh-130);
  258.     SCbsy = false;
  259. }
  260.  
  261. /* Initial Alert Lookup Request */
  262. function processVALookupReset() {
  263.     AlertLupRecCount = 0; // clear Lookup record counter
  264.     if ( RpmCC_VA.AlertGroupLookup("*") ) {
  265.         top.Rstatus.Pstat("Unable to start the Alert LOOKUP request",true);
  266.         processResetButton();
  267.     }
  268.     else {
  269.         VA_CommBusy = 1; // set Comm busy flag
  270.         top.Rstatus.Pstat("One moment while Alert LOOKUP request completes");
  271.     }
  272. }
  273.  
  274. /* Alert Lookup Op Complete */
  275. function processAlertOpComplete() {
  276.     AL_AlertSel.style.display = "none"; // insure hidden
  277.     if (AlertLupRecCount == 0) { // check if any records found
  278.          top.Rstatus.Pstat("No record matches found for Alert LOOKUP request",true);    
  279.      }
  280.      else {
  281.         // Do Services Lookup
  282.         ServicesRecCount = 0; // reset count
  283.         ALupMode = "ServicesLookup";
  284.         rstat = RpmCC_VA.ServicesLookup("","","ComputerID,ID DESC");    
  285.         if ( rstat ) { // if unable to initiate request    
  286.             ALupMode = ""; // reset
  287.             top.Rstatus.Pstat("Unable to start the Services LOOKUP request",true);
  288.         }
  289.         else { // waiting for OperationCompleteEvent
  290.             top.Rstatus.Pstat("One moment while Services LOOKUP request completes");
  291.             return;
  292.         }
  293.      }
  294.     processResetButton();    
  295. }
  296.  
  297. // Print Log
  298. var DiscStatWindow = null;
  299. function processPrintStatus() {
  300.     if ( !top.banner.IE55orBetter ) {
  301.         alert("Print requires IE 5.5/SP1 or greater. Download current, free IE update from Microsoft's web site");
  302.         return;
  303.     }
  304.     FakeBut.click();    // simulate event to call "savePageCoord(...)"
  305.     var wprop = "height="+top.banner.bCh+",width="+top.banner.bCw
  306.     wprop += ",top="+(top.banner.bY-28)+",left="+(top.banner.bX-4)+",scrollbars";
  307.     var rName = ""+Math.random(); // use Random number to get unique Window name
  308.     rName = rName.substring(2,rName.length);
  309.     DiscStatWindow = window.open("",rName,wprop);
  310.     if ( DiscStatWindow == null ) {
  311.         return;   
  312.     }
  313.     var dh = "<html><head><title>MonitorIT - AlertWatch Status Report</title>";
  314.     dh += "<link rel='stylesheet' type='text/css' href='css/rpmstyle.css'></head><body";
  315.     dh += " title='Exit to Close Window when Printing is complete'>"; 
  316.     dh += ELogWin.innerHTML;
  317.     dh += '<script LANGUAGE="JavaScript">ploghdr.border="1"; ploghdr1.width="173"; ploghdr2.width="173"; ploghdr3.width="107"; ploghdr4.width="47"; window.focus();';
  318.     dh += ' </script></body></html>';
  319.     DiscStatWindow.document.open();
  320.     DiscStatWindow.document.write(dh)
  321.     DiscStatWindow.document.close();
  322.     DiscStatWindow.print();
  323. }
  324.  
  325. /* Initialize the Log and Filter Windows */
  326. function processLogAndFilterWindows() {
  327.     var    hs = "";
  328.     outputLogWindowHeader();
  329.      ELogWinInit = ELogWin.innerHTML; // save for clear log
  330.     outputFilterWindowHeader();
  331.     /* Restore the Log Display if Previously Saved */
  332.     hs = top.banner.restoreLogDisplay();
  333.     if ( hs != "" ) { 
  334.         ELogWin.innerHTML = hs;
  335.         ELBgFlg = ELogParams.ELBgFlg; // restore
  336.     } 
  337.     /* Restore the Filter Display and Storage if Previously Saved */
  338.     hs = RpmCC_VA.RegGetKey(top.banner.ServerID+"LogFilterSave");
  339.     if ( hs != "" ) {
  340.         ELogViewCur.innerHTML = hs;
  341.         FilterRecCnt = VA_FilterStore.length / FilterRecSize;
  342.     } 
  343. }
  344. function outputLogWindowHeader() {
  345.     /* Format Output to Log Window */
  346.     FOps = "<table id='ploghdr' border='0' cellpadding='0' cellSpacing='1' width='100%'>";
  347.     FOps += "<tr><td id='ploghdr1' width='170' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  348.     FOps += "Server/Device Name" + "</td>";
  349.     FOps += "<td id='ploghdr2' width='170' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  350.     FOps += "Alert Type" + "</td>";
  351.     FOps += "<td id='ploghdr3' width='106' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  352.     FOps += "Date/Time Stamp" + "</td>";
  353.     FOps += "<td id='ploghdr4' width='65' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  354.     FOps += "Status" + "</td>";
  355.     FOps += "<td width='*' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  356.     FOps += "Action Taken" + "</td>"
  357.     FOps += "</tr></table>";
  358.     ELogWin.insertAdjacentHTML("afterBegin",FOps);
  359. }
  360.  
  361. function outputFilterWindowHeader() {
  362.     /* Format Output to Filter Window */
  363.     FOps = "<table border='0' cellpadding='0' cellSpacing='1' width='500'>";
  364.     FOps += "<tr><td width='50%' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  365.     FOps += "Watch/Alert Name" + "</td>";
  366.     FOps += "<td width='50%' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  367.     FOps += "Watch/Alert" + "</td>";
  368.     FOps += "</tr></table>";
  369.     ELogViewCur.insertAdjacentHTML("beforeEnd",FOps);
  370. }
  371.  
  372. // Process the Unsolicited Alerts that were Accumulated
  373. function processAccumulatedAlerts() {
  374.     var    PrevAgid = "", hs = null;
  375.     /* Get and process the Unsolicited Alerts accumulated */
  376.       var Tflg = ELogParams.logtime; // Time stamp of last Log entry
  377.       if ( Tflg == "0" ) { // get Start Time for Client
  378.        Tflg = top.banner.getLogStartTime();
  379.        ELogParams.logtime = Tflg;
  380.    }
  381.    // Get Win Service Alerts
  382.     var Uaa = top.banner.getUnsolicitedWinServicesAlertArray(); 
  383.     top.banner.enableUnsolicitedWinServicesAlerts();
  384.     var UaaArray = new Array();
  385.     UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileID
  386.     for ( var i=0; i<UaaArray.length; i++ ) {
  387.        hs = UaaArray[i]; // get an AlertGrp ID~LogFileID
  388.        if ( hs != PrevAgid ) { // if same as previous, skip it
  389.            processUnsolicitedWinServicesAlertEvent(hs,Tflg);
  390.            PrevAgid = hs; // set as Previous   
  391.         }
  392.     }
  393.    // Get FileWatch File Check Alerts
  394.     PrevAgid = ""; // reinitialize
  395.     var Uaa = top.banner.getUnsolicitedFileCheckAlertArray(); 
  396.     top.banner.enableUnsolicitedFileCheckAlerts();
  397.     var UaaArray = new Array();
  398.     UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileID
  399.     for ( var i=0; i<UaaArray.length; i++ ) {
  400.        hs = UaaArray[i]; // get an AlertGrp ID~LogFileID
  401.        if ( hs != PrevAgid ) { // if same as previous, skip it
  402.            processUnsolicitedFileCheckAlertEvent(hs,Tflg);
  403.            PrevAgid = hs; // set as Previous   
  404.         }
  405.     }
  406.     // Get SyslogWatch  Alerts
  407.     PrevAgid = ""; // reinitialize
  408.     var Uaa = top.banner.getUnsolicitedSyslogCheckAlertArray(); 
  409.     top.banner.enableUnsolicitedSyslogCheckAlerts();
  410.     var UaaArray = new Array();
  411.     UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileID
  412.     for ( var i=0; i<UaaArray.length; i++ ) {
  413.        hs = UaaArray[i]; // get an AlertGrp ID~LogFileID
  414.        if ( hs != PrevAgid ) { // if same as previous, skip it
  415.            processUnsolicitedSyslogCheckAlertEvent(hs,Tflg);
  416.            PrevAgid = hs; // set as Previous   
  417.         }
  418.     }
  419.    // Get ProcessWatch Process Check Alerts
  420.     PrevAgid = ""; // reinitialize
  421.     var Uaa = top.banner.getUnsolicitedProcessCheckAlertArray(); 
  422.     top.banner.enableUnsolicitedProcessCheckAlerts();
  423.     var UaaArray = new Array();
  424.     UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileID
  425.     for ( var i=0; i<UaaArray.length; i++ ) {
  426.        hs = UaaArray[i]; // get an AlertGrp ID~LogFileID
  427.        if ( hs != PrevAgid ) { // if same as previous, skip it
  428.            processUnsolicitedProcessCheckAlertEvent(hs,Tflg);
  429.            PrevAgid = hs; // set as Previous   
  430.         }
  431.     }
  432.  
  433.    // Get ServerWatch IP Service Alerts
  434.     PrevAgid = ""; // reinitialize
  435.     var Uaa = top.banner.getUnsolicitedServiceAlertArray(); 
  436.     top.banner.enableUnsolicitedServiceAlerts();
  437.     var UaaArray = new Array();
  438.     UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileID
  439.     for ( var i=0; i<UaaArray.length; i++ ) {
  440.        hs = UaaArray[i]; // get an AlertGrp ID~LogFileID
  441.        if ( hs != PrevAgid ) { // if same as previous, skip it
  442.            processUnsolicitedServiceAlertEvent(hs,Tflg);
  443.            PrevAgid = hs; // set as Previous   
  444.         }
  445.     }
  446.    // Get Event Log Alerts
  447.     PrevAgid = ""; // reinitialize
  448.     Uaa = top.banner.getUnsolicitedEventLogAlertArray(); 
  449.     top.banner.enableUnsolicitedEventLogAlerts();
  450.     UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileDataID
  451.     for ( var i=0; i<UaaArray.length; i++ ) {
  452.        hs = UaaArray[i]; // get an AlertGrp ID~LogFileDataID
  453.        if ( hs != PrevAgid ) { // if same as previous, skip it
  454.            processUnsolicitedEventLogAlertEvent(hs,Tflg);
  455.            PrevAgid = hs; // set as Previous   
  456.         }
  457.     }
  458.    // Get SNMP Trap Alerts
  459.     PrevAgid = ""; // reinitialize
  460.     Uaa = top.banner.getUnsolicitedSNMPAlertArray(); 
  461.     top.banner.enableUnsolicitedSNMPAlerts();
  462.     UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~TrapLogRecID
  463.     for ( var i=0; i<UaaArray.length; i++ ) {
  464.        hs = UaaArray[i]; // get an AlertGrp ID~TrapLogRecID
  465.        if ( hs != PrevAgid ) { // if same as previous, skip it
  466.            processUnsolicitedSNMPAlertEvent(hs,Tflg);
  467.            PrevAgid = hs; // set as Previous   
  468.         }
  469.     }
  470.     // Get Object:Counter Alerts
  471.     PrevAgid = ""; // reinitialize
  472.     Uaa = top.banner.getUnsolicitedAlertArray(); 
  473.     top.banner.enableUnsolicitedCounterAlerts();
  474.     UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs
  475.     UaaArray = UaaArray.sort(); // Sort it to not process duplicates
  476.     for ( var i=0; i<UaaArray.length; i++ ) {
  477.        hs = UaaArray[i]; // get an AlertGrp ID
  478.        if ( hs != PrevAgid ) { // if same as previous, skip it
  479.            processUnsolicitedAlertEvent(hs,Tflg);
  480.            PrevAgid = hs; // set as Previous   
  481.         }
  482.     }
  483.    // Get User Alerts
  484.     Uaa = top.banner.getUnsolicitedUserAlertArray(); 
  485.     top.banner.enableUnsolicitedUserAlerts();
  486.     UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~CID
  487.     for ( var i=0; i<UaaArray.length; i++ ) {
  488.        if ( (hs = UaaArray[i]) != "" ) { // get an AlertGrp ID~CID
  489.               processUnsolicitedUserAlertEvent(hs,Tflg);
  490.           }
  491.     }
  492.     
  493.     if ( ELogParams.logeventid != "" ) {
  494.        //ClearButton.className = "BoxButton"; // enable button
  495.        ClearButton.disabled = ""; // enable button   
  496.     }
  497. }
  498.  
  499. /* Play specified WAV file as an AudioAlert */
  500. function processAlertAudioOut() {
  501.     if ( AlertAudioEnabled.checked == false || AudioOutBusy == true )
  502.         return; // exit if not enabled or Busy
  503.     RpmCC_VA.DoMessageBeep(0x40); // System Asterisk
  504. }
  505. function freeAudioOut() {
  506.     AudioOutBusy = false;
  507. }
  508.  
  509. /* Process the Unsolicited Object:Counter Alert Event */
  510. function processUnsolicitedAlertEvent(Agid,Tflg) {
  511.     if ( CheckAlertFilter(Agid,Tflg) == false ) 
  512.         return; // if not in filter
  513.     top.Rstatus.Pstat("CounterWatch Alert Broadcast Received",true);
  514.     addElementToSelect(VA_CounterEventStore,Agid); //+0
  515.     addElementToSelect(VA_CounterEventStore,Tflg); //+0
  516.     if ( ATid == null ) {
  517.         ATid = setTimeout("processCounterAlert()",1500); // Delay 1.5 sec then process
  518.    }
  519.    
  520. }
  521. var CounterEventRecLth = 2;
  522. function processCounterAlert() {
  523.     if ( VA_CounterEventStore.length == 0 ) {
  524.         ATid = null;
  525.         return;
  526.     }
  527.     var Agid = VA_CounterEventStore.options[0].text;
  528.     var Tflg = VA_CounterEventStore.options[1].text;
  529.     for ( var i=0; i<VA_CounterEventStore.length; i+=CounterEventRecLth ) {
  530.        if (VA_CounterEventStore.options[i].text == Agid) {
  531.            VA_CounterEventStore.remove(i); // remove
  532.             VA_CounterEventStore.remove(i); // remove
  533.               i-=CounterEventRecLth;// readjust
  534.        }
  535.     }
  536.     // Recheck filter and get index to entry
  537.     if ( CheckAlertFilter(Agid,null) ) {
  538.           Tflg = (Tflg == "null") ? ELogParams.logtime : Tflg;
  539.         var FilObj = VA_FilterStore; // Filter Store
  540.         var Scid = ""; // Computer Id Array
  541.         var Aedt = "12/31/2030 23:59:59"; // default end d/t
  542.         if ( FilObj.length == 0 ) { // if filter is empty
  543.             var WrkArr = new Array();
  544.             var CACArray = new Array();
  545.             getAlertName(Agid); // get index to alert store
  546.             var aix = AlertSelectIdx * AlertRecLength;
  547.             CACArray = AlertStoreArr[aix+10].split(";"); 
  548.  
  549.             /* Compute Array of Computer IDs */
  550.             var MCC = --CACArray.length; // adjust for null last entry
  551.             for ( var i=0; i<MCC; i++ ) {
  552.                 // get Computer ID from triplet of "CompId.ObjId,CntrId"
  553.                 WrkArr = CACArray[i].split(","); 
  554.                 if ( i > 0) {
  555.                    Scid += ","; // array id separator
  556.                }
  557.                 Scid += WrkArr[0];
  558.             }
  559.         }
  560.         else {
  561.             Scid = FilObj.options[FilterSelectIdx+1].text;    // Comp ID from the Filter
  562.             Aedt = FilObj.options[FilterSelectIdx+4].text;    // Filter End D/T
  563.         }
  564.         /* Initiate Read of Event Table for Events Matching Criteria */
  565.         if ( RpmCC_VA.AlertEventsLookup(Agid,Scid,Tflg,Aedt) ) {
  566.             top.Rstatus.Pstat("Unable to start the Alert Event LOOKUP request",true);
  567.         }
  568.         else {
  569.             VA_CommBusy = 1; // set Comm busy flag
  570.             return; // wait until complete
  571.         }
  572.     }
  573.     ATid = setTimeout("processCounterAlert()",1000); // Delay 1 sec then try again
  574. }
  575.  
  576. /* Process the Unsolicited File Check Alert Event */
  577. function processUnsolicitedFileCheckAlertEvent(AGID_FCLID,Tflg) {
  578.     var warr = new Array();
  579.     warr = AGID_FCLID.split("~"); // split out Alert Grp ID and File Check Log Record ID
  580.     if ( CheckAlertFilter(warr[0],Tflg) == false ) 
  581.         return; // if not in filter
  582.     top.Rstatus.Pstat("FileWatch Alert Broadcast Received",true);
  583.     /* Initiate Read of File Check Log Data */
  584.     if ( RpmCC_VA.FileCheckLogLookup(warr[1]) ) {
  585.         top.Rstatus.Pstat("Unable to start the File Check Log Data Record LOOKUP request",true);
  586.     }
  587. }
  588. // File Check Alert Log Record
  589. function processAlertFileCheckRecord(LogRecStrg) {
  590.       var WLRec = new Array();
  591.       WLRec = LogRecStrg.split("~"); // parse the Log Record
  592.       // Alert Group ID, Computer ID, Time Stamp
  593.     if ( IsDisplayInLog(WLRec[3],WLRec[2],WLRec[8]) == false )
  594.         return; // Didn't pass filter test
  595.  
  596.     // Check for duplicate by comparing versus Event ID array 
  597.     var EidArr = new Array();     
  598.     EidArr = ELogParams.logeventid.split(",");
  599.     Eid = WLRec[0]+"~"+WLRec[3]; // Event ID = FileCheckLogID~AlertGroupID
  600.     for ( var i=0; i<EidArr.length; i++ ) {
  601.         if ( Eid == EidArr[i] ) // if match then duplicate
  602.               return;
  603.     }
  604.     var CompID = WLRec[2]; // Computer ID
  605.     // Save File Check Log Record string in temporary store
  606.     addElementToSelect(VA_ServEventStore,CompID); //+0
  607.     addElementToSelect(VA_ServEventStore,"FileCheckLog~"+LogRecStrg);
  608.     // Lookup Computer Name and Description 
  609.     if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { 
  610.     // if read not already in progress, 
  611.         if ( !goCheckServEventStore() ) {
  612.             goCheckUserEventStore();
  613.         }
  614.     }
  615. }
  616.  
  617. /* Process the Unsolicited Process Check Alert Event */
  618. function processUnsolicitedProcessCheckAlertEvent(AGID_FCLID,Tflg) {
  619.     var warr = new Array();
  620.     warr = AGID_FCLID.split("~"); // split out Alert Grp ID and Process Check Log Record ID
  621.     if ( CheckAlertFilter(warr[0],Tflg) == false ) 
  622.         return; // if not in filter
  623.     top.Rstatus.Pstat("ProcessWatch Alert Broadcast Received",true);
  624.     /* Initiate Read of File Check Log Data */
  625.     if ( RpmCC_VA.ProcessCheckLogLookup(warr[1]) ) {
  626.         top.Rstatus.Pstat("Unable to start the ProcessWatch Log Data Record LOOKUP request",true);
  627.     }
  628. }
  629. // Process Check Alert Log Record
  630. function processAlertProcessCheckRecord(LogRecStrg) {
  631.       var WLRec = new Array();
  632.       WLRec = LogRecStrg.split("~"); // parse the Log Record
  633.       // Alert Group ID, Computer ID, Time Stamp
  634.     if ( IsDisplayInLog(WLRec[3],WLRec[2],WLRec[8]) == false )
  635.         return; // Didn't pass filter test
  636.  
  637.     // Check for duplicate by comparing versus Event ID array 
  638.     var EidArr = new Array();     
  639.     EidArr = ELogParams.logeventid.split(",");
  640.     Eid = WLRec[0]+"~"+WLRec[3]; // Event ID = FileCheckLogID~AlertGroupID
  641.     for ( var i=0; i<EidArr.length; i++ ) {
  642.         if ( Eid == EidArr[i] ) // if match then duplicate
  643.               return;
  644.     }
  645.     var CompID = WLRec[2]; // Computer ID
  646.     // Save File Check Log Record string in temporary store
  647.     addElementToSelect(VA_ServEventStore,CompID); //+0
  648.     addElementToSelect(VA_ServEventStore,"ProcessCheckLog~"+LogRecStrg);
  649.     // Lookup Computer Name and Description 
  650.     if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { 
  651.     // if read not already in progress, 
  652.         if ( !goCheckServEventStore() ) {
  653.             goCheckUserEventStore();
  654.         }
  655.     }
  656. }
  657. /* Process the Unsolicited Syslog Check Alert Event */
  658. function processUnsolicitedSyslogCheckAlertEvent(AGID_FCLID,Tflg) {
  659.     var warr = new Array();
  660.     warr = AGID_FCLID.split("~"); // split out Alert Grp ID and Syslog Check Log Record ID
  661.     if ( CheckAlertFilter(warr[0],Tflg) == false ) 
  662.         return; // if not in filter
  663.     top.Rstatus.Pstat("SYSLOGWatch Alert Broadcast Received",true);
  664.     /* Initiate Read of File Check Log Data */
  665.     if ( RpmCC_VA.SyslogCheckLogLookup(warr[1]) ) {
  666.         top.Rstatus.Pstat("Unable to start the Syslog Check Log Data Record LOOKUP request",true);
  667.     }
  668. }
  669. // SYSLOG Check Alert Log Record
  670. function processAlertSyslogCheckRecord(LogRecStrg) {
  671.       var WLRec = new Array();
  672.       WLRec = LogRecStrg.split("~"); // parse the Log Record
  673.       // Alert Group ID, Computer ID, Time Stamp
  674.     if ( IsDisplayInLog(WLRec[3],WLRec[2],WLRec[8]) == false )
  675.         return; // Didn't pass filter test
  676.  
  677.     // Check for duplicate by comparing versus Event ID array 
  678.     var EidArr = new Array();     
  679.     EidArr = ELogParams.logeventid.split(",");
  680.     Eid = WLRec[0]+"~"+WLRec[3]; // Event ID = FileCheckLogID~AlertGroupID
  681.     for ( var i=0; i<EidArr.length; i++ ) {
  682.         if ( Eid == EidArr[i] ) // if match then duplicate
  683.               return;
  684.     }
  685.     var CompID = WLRec[2]; // Computer ID
  686.     // Save File Check Log Record string in temporary store
  687.     addElementToSelect(VA_ServEventStore,CompID); //+0
  688.     addElementToSelect(VA_ServEventStore,"SyslogCheckLog~"+LogRecStrg);
  689.     // Lookup Computer Name and Description 
  690.     if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { 
  691.     // if read not already in progress, 
  692.         if ( !goCheckServEventStore() ) {
  693.             goCheckUserEventStore();
  694.         }
  695.     }
  696. }
  697. /* Process the Unsolicited Win Services Alert Event */
  698. function processUnsolicitedWinServicesAlertEvent(AGID_WSLID,Tflg) {
  699.     var warr = new Array();
  700.     warr = AGID_WSLID.split("~"); // split out Alert Grp ID and NT Services Log Record ID
  701.     if ( CheckAlertFilter(warr[0],Tflg) == false ) 
  702.         return; // if not in filter
  703.     top.Rstatus.Pstat("WinServicesWatch Alert Broadcast Received",true);
  704.     /* Initiate Read of Win Services Log Data */
  705.     if ( RpmCC_VA.NTServicesLogLookup(warr[1]) ) {
  706.         top.Rstatus.Pstat("Unable to start the Windows Services Log Data Record LOOKUP request",true);
  707.     }
  708. }
  709. var WSAE_Arr = new Array();
  710. var WSAE_ArrRecLength = 5;
  711. // Win Services Alert Log Record
  712. function processAlertWinServicesRecord(LogRecStrg) {
  713.       var WLRec = new Array();
  714.       WLRec = LogRecStrg.split("~"); // parse the Log Record
  715.     var dob = new Date(); // get current d/t
  716.       // Alert Group ID, Computer ID, Time Stamp
  717.     if ( IsDisplayInLog(WLRec[1],WLRec[5],WLRec[4]) == false )
  718.         return; // Didn't pass filter test
  719.  
  720.     /* Check for duplicate by comparing versus Event ID array */
  721.     var EidArr = new Array();     
  722.     EidArr = ELogParams.logeventid.split(",");
  723.     Eid = WLRec[0]+"~"+WLRec[1]; // Event ID = ServicesLogID~AlertGroupID
  724.     for ( var i=0; i<EidArr.length; i++ ) {
  725.         if ( Eid == EidArr[i] ) // if match then duplicate
  726.               return;
  727.     }
  728.     var CompID = WLRec[5]; // Computer ID
  729.     // Save Win Services Log Record string in temporary store
  730.     addElementToSelect(VA_ServEventStore,CompID); //+0
  731.     addElementToSelect(VA_ServEventStore,"WinServicesLog~"+LogRecStrg);
  732.     /* Lookup Computer Name and Description */
  733.     if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { 
  734.     // if read not already in progress, 
  735.         if ( !goCheckServEventStore() ) {
  736.             goCheckUserEventStore();
  737.         }
  738.     }
  739. }
  740.  
  741. /* Process the Unsolicited Event Log Alert Event */
  742. function processUnsolicitedEventLogAlertEvent(AGID_ELDID,Tflg) {
  743.     var warr = new Array();
  744.     warr = AGID_ELDID.split("~"); // split out Alert Grp ID and LogData Record ID
  745.     if ( CheckAlertFilter(warr[0],Tflg) == false ) 
  746.         return; // if not in filter
  747.     top.Rstatus.Pstat("EventLogWatch Alert Broadcast Received",true);
  748.     /* Initiate Read of EventLog Data */
  749.     if ( RpmCC_VA.GetEventLogDataRecord(warr[1]) ) {
  750.         top.Rstatus.Pstat("Unable to start the EventLog Data Record LOOKUP request",true);
  751.     }
  752.     else {
  753.         VA_CommBusy = 1; // set Comm busy flag
  754.     }
  755. }
  756. // Event Log Alert Log Record
  757. function processAlertEventLogRecord(LogRecStrg) {
  758.       var SLRec = new Array();
  759.       SLRec = LogRecStrg.split("~"); // parse the Log Record
  760.       // Alert Group ID, Computer ID, Time Stamp
  761.     if ( IsDisplayInLog(SLRec[3],SLRec[2],SLRec[5]) == false )
  762.         return; // Didn't pass filter test
  763.  
  764.     /* Check for duplicate by comparing versus Event ID array */
  765.     var EidArr = new Array();     
  766.     EidArr = ELogParams.logeventid.split(",");
  767.     Eid = SLRec[0]+"~"+SLRec[3]; // Event ID = EventLog MonitorID~AlertGroupID
  768.     for ( var i=0; i<EidArr.length; i++ ) {
  769.         if ( Eid == EidArr[i] ) // if match then duplicate
  770.               return;
  771.     }
  772.     var CompID = SLRec[2]; // Computer ID
  773.     // Save Event Log Record string in temporary store
  774.     addElementToSelect(VA_ServEventStore,CompID); //+0
  775.     addElementToSelect(VA_ServEventStore,"EventLog~"+LogRecStrg);
  776.     /* Lookup Computer Name and Description */
  777.     if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { 
  778.     // if read not already in progress, 
  779.         if ( !goCheckServEventStore() ) {
  780.             goCheckUserEventStore();
  781.         }
  782.     }
  783. }
  784. /* Process the Unsolicited SNMP Trap Alert Event */
  785. function processUnsolicitedSNMPAlertEvent(AGID_STLID,Tflg) {
  786.     var warr = new Array();
  787.     warr = AGID_STLID.split("~"); // split out Alert Grp ID and Trap Log Record ID
  788.     if ( CheckAlertFilter(warr[0],Tflg) == false ) 
  789.         return; // if not in filter
  790.     top.Rstatus.Pstat("SNMPTrapWatch Alert Broadcast Received",true);
  791.     /* Initiate Read of SNMP Trap Data */
  792.     if ( RpmCC_VA.GetSnmpTrapLogRecord(warr[1]) ) {
  793.         top.Rstatus.Pstat("Unable to start the SNMP Trap Log Data Record LOOKUP request",true);
  794.     }
  795.     else {
  796.         VA_CommBusy = 1; // set Comm busy flag
  797.     }
  798. }
  799. // SNMP Trap Alert Log Record
  800. function processAlertSNMPRecord(LogRecStrg) {
  801.       var SLRec = new Array();
  802.       SLRec = LogRecStrg.split("~"); // parse the Log Record
  803.       var TMix = getTrapMonitorIX(SLRec[6]); // get Trap Monitor Storage Index 
  804.       if ( TMix < 0 )
  805.           return; // not found
  806.     var dob = new Date(); // get current d/t
  807.     var lst = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear();
  808.     var chrs = (dob.getHours() < 10) ? "0"+dob.getHours() : dob.getHours();
  809.     lst += " " + chrs + ":" + dob.getMinutes() + ":" + dob.getSeconds();
  810.     SLRec[5]=lst; //sunstitute time
  811.     LogRecStrg = SLRec.join("~");
  812.   
  813.       // Alert Group ID, Computer ID, Time Stamp
  814.     if ( IsDisplayInLog(AC_TrapMonitorStore[TMix+2].text,AC_TrapMonitorStore[TMix+1].text,SLRec[5]) == false )
  815.         return; // Didn't pass filter test
  816.  
  817.     /* Check for duplicate by comparing versus Event ID array */
  818.     var EidArr = new Array();     
  819.     EidArr = ELogParams.logeventid.split(",");
  820.     Eid = SLRec[0]+"~"+SLRec[6]; // Event ID = TrapMonitorLogRecID~TrapMonitorID
  821.     for ( var i=0; i<EidArr.length; i++ ) {
  822.         if ( Eid == EidArr[i] ) // if match then duplicate
  823.               return;
  824.     }
  825.     var CompID = AC_TrapMonitorStore[TMix+1].text; // Computer ID
  826.     // Save SNMP Trap Record string in temporary store
  827.     addElementToSelect(VA_ServEventStore,CompID); //+0
  828.     var lrs = LogRecStrg +"~"+AC_TrapMonitorStore[TMix+2].text+"~"+AC_TrapMonitorStore[TMix+1].text;
  829.     addElementToSelect(VA_ServEventStore,"SNMPTrap~"+lrs);
  830.     /* Lookup Computer Name and Description */
  831.     if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { 
  832.     // if read not already in progress, 
  833.         if ( !goCheckServEventStore() ) {
  834.             goCheckUserEventStore();
  835.         }
  836.     }
  837. }
  838. // Find Index to TrapMonitor Record Store based on TrapMonitor ID
  839. function getTrapMonitorIX(TMid) {
  840.     for ( var i=0; i<AC_TrapMonitorStore.length; i+=TrapMonRecSize ) {
  841.        if ( AC_TrapMonitorStore[i].text == TMid) {
  842.            break;
  843.        }
  844.    }
  845.    // if found
  846.    var retv =  ( i <AC_TrapMonitorStore.length )? i : -1;
  847.    return retv;    
  848. }
  849.  
  850. /* Process the Unsolicited Service Alert Event */
  851. var MRLogRecID = null;
  852. function processUnsolicitedServiceAlertEvent(AGID_LFID,Tflg) {
  853.     var warr = new Array();
  854.     warr = AGID_LFID.split("~"); // split out Alert Grp ID and Log Record ID
  855.     if ( CheckAlertFilter(warr[0],Tflg) == false ) 
  856.         return; // if not in filter
  857.     top.Rstatus.Pstat("ServerWatch Alert Broadcast Received",true);
  858.     /* Initiate Read of Event Table for Events Matching Criteria */
  859.     if ( RpmCC_VA.ServicesLogGetRecord(warr[1]) ) {
  860.         top.Rstatus.Pstat("Unable to start the Services Log LOOKUP request",true);
  861.     }
  862.     else {
  863.         MRLogRecID = warr[1]; // save Log Record ID
  864.         VA_CommBusy = 1; // set Comm busy flag
  865.     }
  866. }
  867.  
  868. var ServEventRecLth = 2;
  869. // Services Alert Log Record
  870. function processAlertServicesLogRecord(LogRecStrg) {
  871.       var SLRec = new Array();
  872.       SLRec = LogRecStrg.split("~"); // parse the Log Record
  873.       // Alert Group ID, Computer ID Time Stamp
  874.     if ( IsDisplayInLog(SLRec[2],SLRec[3],SLRec[5]) == false )
  875.         return; // Didn't pass filter test
  876.  
  877.     /* Check for duplicate by comparing versus Event ID array */
  878.     var EidArr = new Array();     
  879.     EidArr = ELogParams.logeventid.split(",");
  880.     Eid = SLRec[0]+"~"+SLRec[2]; // Event ID = ServiceRecID~AlertGroupID
  881.     for ( var i=0; i<EidArr.length; i++ ) {
  882.         if ( Eid == EidArr[i] ) // if match then duplicate
  883.               return;
  884.     }
  885.     var CompID = SLRec[3]; // Computer ID
  886.     // Save Event Log Record string in temporary store
  887.     addElementToSelect(VA_ServEventStore,CompID); //+0
  888.     addElementToSelect(VA_ServEventStore,LogRecStrg);
  889.     /* Lookup Computer Name and Description */
  890.     if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { 
  891.     // if read not already in progress, 
  892.         if ( !goCheckServEventStore() ) {
  893.             goCheckUserEventStore();
  894.         }
  895.     }
  896. }
  897.  
  898. var curServAlertCompNme = null;
  899. var curServAlertCompDesc = null;
  900. function processAlertServicesComputerLookup(CID,CNME,CDESC) {
  901.     curServAlertCompNme = CNME; // save Computer Name and Description
  902.     curServAlertCompDesc = CDESC;
  903.     goProcessLogRec(CID); // go process log record
  904.     if ( !goCheckServEventStore() ) {
  905.         goCheckUserEventStore();
  906.     }
  907. }
  908. function goCheckServEventStore() {
  909.     var CompID = null; 
  910.     while ( VA_ServEventStore.length > 0 ) {
  911.         CompID = VA_ServEventStore.options[0].text; // get next entry
  912.         if ( getCompNameDesc(CompID) ) { // see if Computer already in local store
  913.             if ( !goProcessLogRec(CompID) ) // yes-go process immediately
  914.                 break;
  915.         }
  916.         else if ( !RpmCC_VA.ComputerLookupByIDArray(CompID) ) {
  917.             ALupMode = "AlertEvent"; 
  918.             VA_CommBusy = 1; // set Comm busy flag
  919.             return true; // exit now
  920.         }
  921.     }
  922.     ALupMode = ""; // reset
  923.     return false;
  924. }
  925. function    goProcessLogRec(CmpID) { //  process log record
  926.     /* Get Log Record from Store based on Computer ID */
  927.     for (var i=0; i < VA_ServEventStore.length; i+=ServEventRecLth) {
  928.         if ( VA_ServEventStore.options[i].text == CmpID ) {
  929.             outputLogEvent(null,VA_ServEventStore.options[i+1].text); // go process
  930.             for ( var j=0; j<ServEventRecLth; j++ ) { // remove from temporary store
  931.                 VA_ServEventStore.remove(i);   
  932.             }
  933.             return true;
  934.           }
  935.     }
  936.     return false;
  937. }
  938.  
  939. /* Process the Unsolicited User Alert Event */
  940. var UserEventRecLth = 2;
  941. function processUnsolicitedUserAlertEvent(AGID_CID,Tflg) {
  942.     var warr = new Array();
  943.     warr = AGID_CID.split("~"); // split out Alert Grp ID and Computer ID
  944.     if ( CheckAlertFilter(warr[0],Tflg) == false ) {
  945.         return; // if not in filter
  946.     }
  947.     top.Rstatus.Pstat("User Alert Broadcast Received",true);
  948.     var CmpID = warr[1]; // Computer ID
  949.     // Save User Event info in temporary store
  950.     addElementToSelect(VA_UserEventStore,CmpID); // Comp ID
  951.     addElementToSelect(VA_UserEventStore,warr[0]); // Alert GroupID
  952.     if ( ALupMode != "AlertEvent" && ALupMode != "UserAlertEvent" ) { 
  953.         // if read not already in progress, 
  954.         if ( !goCheckUserEventStore() ) {
  955.             goCheckServEventStore();
  956.         }
  957.     }
  958. }
  959. function goCheckUserEventStore() {
  960.     var rstat = false;
  961.     while ( VA_UserEventStore.length > 0 ) {
  962.         var CompID = VA_UserEventStore.options[0].text; // get next entry CID
  963.         for ( var i=0; i<AC_CompStoreArr.length; i+=CompRecLength ) {
  964.             if ( CompID == AC_CompStoreArr[i] ) { // if in Store
  965.                 // get Computer Name and Description & output Log entry
  966.                 rstat = goProcessUserRec(CompID,AC_CompStoreArr[i+1],AC_CompStoreArr[i+2]);
  967.                 break;
  968.             }
  969.         }
  970.         if ( i < AC_CompStoreArr.length ) { // if Comp ID found
  971.             if ( rstat == true ) {
  972.                 continue; // check next
  973.             }
  974.         }
  975.         else if ( !RpmCC_VA.ComputerLookupByIDArray(CompID) ) {
  976.             ALupMode = "UserAlertEvent"; 
  977.             VA_CommBusy = 1; // set Comm busy flag
  978.             return true; // exit now
  979.         }
  980.     }
  981.     ALupMode = ""; // reset
  982.     return false;
  983. }
  984. function processAlertUserComputerLookup(CID,CNME,CDESC) {
  985.     goProcessUserRec(CID,CNME,CDESC); // go process event record
  986.     if ( !goCheckUserEventStore() )
  987.         goCheckServEventStore();
  988. }
  989. function goProcessUserRec(CmpID,CNME,CDESC) { //  process User Alert record
  990.     /* Get Log Record from Store based on Computer ID */
  991.     for (var i=0; i < VA_UserEventStore.length; i+=UserEventRecLth) {
  992.         if ( VA_UserEventStore.options[i].text == CmpID ) {
  993.             var olP = "UserAlert~"+VA_UserEventStore.options[i+1].text+"~"+CNME;
  994.             olP += "~"+CDESC; 
  995.             outputLogEvent(null,olP);
  996.             for ( var j=0; j<UserEventRecLth; j++ ) { // remove from temporary store
  997.                 VA_UserEventStore.remove(i);   
  998.             }
  999.             return true;
  1000.           }
  1001.     }
  1002.     return false;
  1003. }
  1004.  
  1005. /* Check Filter for Eligible Alert */
  1006. function CheckAlertFilter(Agid,Tflg) {
  1007.     if ( Tflg == null ) { // set serach time for Event if not specified
  1008.        Tflg = ELogParams.logtime;
  1009.           if ( Tflg == "0" ) { // get Start Time for Client
  1010.            Tflg = top.banner.getLogStartTime();
  1011.            ELogParams.logtime = Tflg;
  1012.        }
  1013.     }
  1014.     return IsDisplayInLog(Agid,null,Tflg);// check if in Filter
  1015. }        
  1016.  
  1017. /* Process Clear Log button click */
  1018. function processClearButton() {
  1019.     ELogWin.innerHTML = ELogWinInit; // clear log
  1020.     /* Redefine Log Time based on Current Time */
  1021.     var dob = new Date(); // get current d/t
  1022.     var lt = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear();
  1023.     lt += " " + dob.getHours() + ":" + dob.getMinutes() + ":" + dob.getSeconds();
  1024.     ELogParams.logtime = lt; // update the D/T stamp    
  1025.     ELBgFlg = 0;
  1026.    //ClearButton.className = "BoxButtonD"; // disable button
  1027.    ClearButton.disabled = "disabled"; // disable button   
  1028.    //StatusPrintButton.className = "BoxButtonD"; // disable button
  1029.    StatusPrintButton.disabled = "disabled"; // disable button   
  1030. }
  1031.  
  1032. /* Process Configure Button Click */
  1033. function processConfigureButton() {
  1034.     if ( ALupMode == "AlertEvent" )
  1035.         return; // ignore, currently doing Computer Lookup
  1036.    //ConfigButton.className = "BoxButtonD"; // disable button
  1037.    ConfigButton.disabled = "disabled"; // disable button
  1038.     PopUpDiv.style.display="";
  1039.     AL_AlertSel.style.display = "";
  1040.     if ( AL_AlertSel.length > 0 ) {
  1041.         AL_AlertSel.options[0].selected = "selected";
  1042.         populateInput(0);
  1043.     }
  1044. }
  1045.  
  1046. function processDoneButton() {
  1047.     ALupMode = ""; // reset
  1048.     RpmCC_VA.RegSetKey(top.banner.ServerID+"LogFilterSave",ELogViewCur.innerHTML)
  1049.     closeCalendarFields();// close calendar fields if opened
  1050.     AL_AlertSel.style.display = "none";
  1051.     PopUpDiv.style.display = "none";
  1052.    //ConfigButton.className = "BoxButton"; // enable button
  1053.    ConfigButton.disabled = ""; // enable button   
  1054.     top.Rstatus.Pstat("");
  1055. }
  1056.  
  1057. /* Process ViewCurrent and Hide Current Log Filter Button Clicks */
  1058. function processViewCurrentButton() {
  1059.       ELogWin.style.height=ELogWinSplitH;
  1060.    vct = ELogViewCurLine.innerHTML;
  1061.     ELogViewCurLine.style.display="";
  1062.     ELogViewCurLine.innerHTML = vct;
  1063.    //ViewCurrentButton.className = "BoxButtonD"; // disable button
  1064.    ViewCurrentButton.disabled = "disabled"; // disable button
  1065.     ELogViewCurLine.scrollIntoView(false);
  1066. }
  1067.  
  1068. function processHideCurrentButton() {
  1069.       ELogWin.style.height=ELogWinFullH;
  1070.     ELogViewCurLine.style.display="none";
  1071.    //ViewCurrentButton.className = "BoxButton"; // enable button
  1072.    ViewCurrentButton.disabled = ""; // disable button
  1073. }
  1074.  
  1075. /* Process Update Log Filter and Window */
  1076. function processUpdateLogFilter(FilOp) {
  1077.     if ( FilOp == "add" ) { // Add an entry to the Current View
  1078.          FOps = "<div agrpid='" + CurAlertID + "' onclick='processLogFilterClick(this)' id='lf";
  1079.          FOps += CurAlertID + "' style='background-color:white; cursor:hand'>"
  1080.     }
  1081.     else { // otherwise, Update an entry in the Current View
  1082.           Fo = document.all["lf"+CurAlertID];
  1083.         Fo.innerHTML = ""; // clear entry 
  1084.         FOps = "";
  1085.     }
  1086.  
  1087.     /* Accomodate Names Larger than Field Size */    
  1088.     if (CurrentAlertType == "C") { Fcon = "Counter: " + CurCntrName + " : " + CurObjName; }
  1089.     else if (CurrentAlertType == "S") { Fcon ="IP Service: " + curServName; }
  1090.     else if (CurrentAlertType == "E") { Fcon = "EventLog: " + CurELName; }
  1091.     else if (CurrentAlertType == "T") { Fcon = "SNMPTrap"; }
  1092.     else if (CurrentAlertType == "W") { Fcon = "WinServices"; }
  1093.     else if (CurrentAlertType == "F") { Fcon = "File"; }
  1094.     else if (CurrentAlertType == "L") { Fcon = "SYSLOG"; }
  1095.     else if (CurrentAlertType == "P") { Fcon = "Process"; }
  1096.     else { Fcon = "User: Alert"; }
  1097.     if ( Fcon.length > 47 ) { // Object : Name
  1098.         FconT = Fcon + "  /  "; // set for display in the title
  1099.         Fcon = Fcon.substring(0,46) + "...";   
  1100.     }
  1101.     else {
  1102.        FconT = ""; 
  1103.     }
  1104.     FconDesc = (CurrentAlertType == "C")  ? CurCntrDesc : "";
  1105.  
  1106.     /* Output Parameters */
  1107.     FOps += "<table border='0' cellpadding='0' cellSpacing='1' width='500'>";
  1108.     FOps += "<tr><td width='50%' align='left' class='optext' style='cursor:hand' title='" + CurAlertDesc + "'>";
  1109.     FOps += CurAlertName + "</td>";
  1110.     FOps += "<td width='50%' align='left' class='optext' style='cursor:hand' title='" + FconT + FconDesc + "'>";
  1111.     FOps += Fcon + "</td>";
  1112.     FOps += "</tr></table>";
  1113.  
  1114.     if ( FilOp == "add" ) {
  1115.         FOps += "</div>";
  1116.         ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : "";
  1117.         ELogViewCur.insertAdjacentHTML("beforeEnd",FOps);
  1118.     }
  1119.     else {
  1120.         Fo.insertAdjacentHTML("beforeEnd",FOps);
  1121.     }
  1122. }
  1123.  
  1124. /* Process Click on an Entry in the Log Filter Current View */
  1125. var CurLflSelected = null;
  1126. function processLogFilterClick(LFobj) {
  1127.     if ( CurLflSelected != null ) {
  1128.        document.all[CurLflSelected].style.backgroundColor = "white";
  1129.     }
  1130.     if ( CurLflSelected == LFobj.id ) { // if same line
  1131.         //VC_DeleteButton.className = "BoxButtonD";
  1132.         VC_DeleteButton.disabled = "disabled";
  1133.         CurLflSelected = null;
  1134.     }
  1135.     else {
  1136.         CurLflSelected = LFobj.id;
  1137.         LFobj.style.backgroundColor = "scrollbar";
  1138.         //VC_DeleteButton.className = "BoxButton";
  1139.         VC_DeleteButton.disabled = "";
  1140.     }
  1141. }
  1142.  
  1143. /* Process Delete Button Click */
  1144. function processDeleteEntryButton() {
  1145.     if ( CurLflSelected != null ) { // if an entry is highlited
  1146.         // delete highlited entry
  1147.         CAid = document.all[CurLflSelected].agrpid; // get AlertGrp ID
  1148.        document.all[CurLflSelected].outerText = ""; // clear entry
  1149.         CurLflSelected = null; // reset to no selected entry
  1150.           //VC_DeleteButton.className = "BoxButtonD"; // disable Delete button
  1151.           VC_DeleteButton.disabled = "disabled"; // disable Delete button
  1152.       
  1153.        // clear entry from the Filter Store
  1154.         FilObj = VA_FilterStore; // Filter Store
  1155.         if ( getFilterEntry(CAid) == null ) // Find index to the entry in the Store
  1156.             return; // if entry not found
  1157.         for ( var i=0; i<FilterRecSize; i++ ) { // remove entry from the Store
  1158.             FilObj.remove(FilterSelectIdx);
  1159.         }
  1160.        --FilterRecCnt; // adjust count
  1161.         ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : "";
  1162.        // update save in Registry
  1163.         RpmCC_VA.RegSetKey(top.banner.ServerID+"LogFilterSave",ELogViewCur.innerHTML)
  1164.    }
  1165. }
  1166.  
  1167. /* Process Show Event Button Click */
  1168. var   FilterRecSize = 7; // Filter Record size
  1169. function processApplyButton() {
  1170.     var Scid = ""; // Computer ID Array
  1171.     if ( CurrentAlertType == "C" || CurrentAlertType == "S" || CurrentAlertType == "W" || CurrentAlertType == "L"
  1172.             || CurrentAlertType == "E" || CurrentAlertType == "T" || CurrentAlertType == "F" || CurrentAlertType == "P") { 
  1173.             // if Service, Event Log, Win Servcie or Counter type
  1174.         /* Create an array of selected computers */
  1175.         for ( var i=0, j=0; i<CountOfComps; i++ ) { // Test each computer for Checked
  1176.             if ( document.all["cmpa_"+i].checked == "1" ) {
  1177.                 if ( j > 0) {
  1178.                    Scid += ","; // array id separator
  1179.                 }
  1180.                 Scid += document.all["cmpa_"+i].cmpid; // save Computer ID
  1181.                 ++j;
  1182.             }
  1183.         }
  1184.         if ( j == 0 ) {
  1185.             CurLflSelected = "lf"+CurAlertID;
  1186.             processDeleteEntryButton();
  1187.               return;
  1188.         }
  1189.     }
  1190.     // if unchecked User Alert
  1191.     else if ( CurrentAlertType == "U" && usralt0.checked == "0" ) {
  1192.         CurLflSelected = "lf"+CurAlertID;
  1193.         processDeleteEntryButton();
  1194.         return;
  1195.     }
  1196.  
  1197.     var nd = new Array();
  1198.     ASdt = VA_StartDate.value; // Get Start Date
  1199.     AEdt = VA_StopDate.value; // Get End Date
  1200.     if ( ASdt.length == 0 || AEdt.length == 0) {
  1201.         top.Rstatus.Pstat("Please enter valid Start and Stop Date",true);    
  1202.         VA_StartDate.focus();
  1203.         return;
  1204.     }
  1205.     nd = ASdt.split(" ");
  1206.     ASdt = nd[3] + " " + "0:0:0";
  1207.     var Dob = new Date(ASdt); // Date object
  1208.     Sms = Dob.getTime(); // Milliseconds since 1/1/70 0:0:0
  1209.  
  1210.     nd = AEdt.split(" ");
  1211.     AEdt = nd[3] + " " + "23:59:59";
  1212.     Dob = new Date(AEdt);
  1213.     Ems = Dob.getTime(); // Milliseconds since 1/1/70 0:0:0
  1214.  
  1215.     /* See if entry already exists in the filter */
  1216.     FilObj = VA_FilterStore; // Filter Store
  1217.     if ( getFilterEntry(CurAlertID) != null ) { // if entry already in the filter
  1218.         FilOp = "repl"; // Filter Update Op is Replace
  1219.         i = FilterSelectIdx; // index to found entry
  1220.         FilObj.options[i+1].text = Scid;    
  1221.         FilObj.options[i+2].text = ASdt;
  1222.         FilObj.options[i+3].text = Sms;    
  1223.         FilObj.options[i+4].text = AEdt;    
  1224.         FilObj.options[i+5].text = Ems;    
  1225.         FilObj.options[i+6].text = curServName; // current Service Name if Service    
  1226.     }
  1227.     else { // otherwise, not yet in the Filter Store
  1228.         FilOp = "add"; // Filter Update Op is Add
  1229.         addElementToSelect(FilObj,CurAlertID); 
  1230.         addElementToSelect(FilObj,Scid); 
  1231.         addElementToSelect(FilObj,ASdt);
  1232.         addElementToSelect(FilObj,Sms);
  1233.         addElementToSelect(FilObj,AEdt);
  1234.         addElementToSelect(FilObj,Ems);
  1235.         addElementToSelect(FilObj,curServName); // current Service Name if Service
  1236.         ++FilterRecCnt; // bump record count
  1237.     }
  1238.     /* Update Log Filter Window */
  1239.     processUpdateLogFilter(FilOp);
  1240.     
  1241.     /* Initiate Read of Event Table for Events Matching Criteria if Counter */
  1242.     if ( CurrentAlertType == "C" ) {
  1243.         if ( RpmCC_VA.AlertEventsLookup(CurAlertID,Scid,ASdt,AEdt) ) {
  1244.             top.Rstatus.Pstat("Unable to start the Alert Event LOOKUP request",true);
  1245.         }
  1246.         else {
  1247.             VA_CommBusy = 1; // set Comm busy flag
  1248.             top.Rstatus.Pstat("One moment while Alert Event LOOKUP request completes");
  1249.         }
  1250.     }
  1251.     if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") {
  1252.         AL_AlertSel.focus(); // restore focus
  1253.     }
  1254. }
  1255.  
  1256. /* Search Filter Store for Given Alert Group ID */
  1257. function getFilterEntry(AGID) {
  1258.     FilObj = VA_FilterStore; // Filter Store
  1259.     FilMax = FilterRecCnt * FilterRecSize;
  1260.     for ( i=0; i<FilMax; i+=FilterRecSize ) {
  1261.         if ( AGID == FilObj.options[i].text ) {
  1262.             FilterSelectIdx = i; // save index
  1263.             return i;
  1264.         }
  1265.     }
  1266.     return null;
  1267. }
  1268.  
  1269. // Validate Alert Filter
  1270. function processValidateFilter() {
  1271.     if ( ValidateFilter == false ) 
  1272.         return; // exit if not needed
  1273.     ValidateFilter = false; // reset
  1274.     for ( var i=0; i<VA_FilterStore.length; i+=FilterRecSize ) {
  1275.         // Check for valid Alert Group ID and that End D/T is greater than current D/T
  1276.         if ( !IsValidAlertGroup(VA_FilterStore.options[i].text) ) {
  1277.             // remove entry from Filter display
  1278.            document.all["lf"+VA_FilterStore.options[i].text].outerText = ""; 
  1279.              // remove entry from the Store
  1280.             for ( var j=0; j<FilterRecSize; j++ ) {
  1281.                 VA_FilterStore.remove(i);
  1282.             }
  1283.               --FilterRecCnt; // adjust count
  1284.               i -= FilterRecSize; // adjust index for just deleted entry
  1285.        }
  1286.    }
  1287.     ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : "";
  1288.       // update save in Registry
  1289.     RpmCC_VA.RegSetKey(top.banner.ServerID+"LogFilterSave",ELogViewCur.innerHTML)
  1290. }
  1291. /* Check if Valid Alert Group ID */
  1292. function IsValidAlertGroup(UID) {
  1293.     for (var i=0; i < AlertStoreArr.length; i+=AlertRecLength) {
  1294.         if ( AlertStoreArr[i+1] == UID ) {
  1295.             return true;
  1296.         }
  1297.     }
  1298.     return false;
  1299. }
  1300.  
  1301.  
  1302. /* Search Filter and Determine If Event Should Be Displayed */
  1303. function IsDisplayInLog(AGID,CID,TS) {
  1304.     // check if entry in Filter for Alert Group ID
  1305.     if ( VA_FilterStore.length == 0 ) {
  1306.         return true; // defaultto show everthing if no filter
  1307.     }
  1308.     if ( getFilterEntry(AGID) == null ) 
  1309.          return false; // not in Filter
  1310.  
  1311.     // check if Computer ID in Array of Found Filter entry
  1312.     if ( CID != null ) {
  1313.         var CaR = new Array();
  1314.         FilObj = VA_FilterStore; // Filter Store
  1315.         CaR = FilObj.options[FilterSelectIdx+1].text.split(","); // Comp ID array
  1316.         for ( var i=0; i<CaR.length; ++i ) {
  1317.             if ( CID == CaR[i] ) // if match on Comp ID
  1318.                 break;
  1319.         }
  1320.         if ( i>=CaR.length )
  1321.              return false; // not in Filter
  1322.      }
  1323.          
  1324.     // Specified parameters match a Filter entry
  1325.     return true;
  1326. }
  1327.  
  1328. var   EventRecCount = 0; // Count of temporary Event records 
  1329. var    EventRecLength = 18; // Event record length
  1330. var     EventSelectIdx = 0;
  1331. function AlertEventLupRec1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme) {
  1332.     StoreObj = VA_EventStore; // Storage
  1333.     if ( IsEventExist(EvID) == false ) { // if not received yet
  1334.         addElementToSelect(StoreObj,EvID); //+0
  1335.         addElementToSelect(StoreObj,EvTimStmp);
  1336.         addElementToSelect(StoreObj,EvCntNme);
  1337.         addElementToSelect(StoreObj,EvObjNme);
  1338.         addElementToSelect(StoreObj,EvCmpNme); 
  1339.         addElementToSelect(StoreObj,EvValue); //+5
  1340.         addElementToSelect(StoreObj,EvEmNotify); 
  1341.         addElementToSelect(StoreObj,EvPhNotify); 
  1342.         addElementToSelect(StoreObj,EvProNotify); 
  1343.         addElementToSelect(StoreObj,EvPgNotify); //+9
  1344.         addElementToSelect(StoreObj,EvThresh); 
  1345.         addElementToSelect(StoreObj,EvOver); 
  1346.         addElementToSelect(StoreObj,EvDur); //+12
  1347.         /* allocate space for Part 2 */
  1348.         addElementToSelect(StoreObj,""); //+13
  1349.         addElementToSelect(StoreObj,"");
  1350.         addElementToSelect(StoreObj,"");
  1351.         addElementToSelect(StoreObj,"");
  1352.         addElementToSelect(StoreObj,""); //+17
  1353.     }
  1354.     else { // already received Part 2, update Part 1
  1355.         ESix = EventSelectIdx * EventRecLength;
  1356.         StoreObj.options[ESix+0].text = EvID;
  1357.         StoreObj.options[ESix+1].text = EvTimStmp;
  1358.         StoreObj.options[ESix+2].text = EvCntNme;
  1359.         StoreObj.options[ESix+3].text = EvObjNme;
  1360.         StoreObj.options[ESix+4].text = EvCmpNme;
  1361.         StoreObj.options[ESix+5].text = EvValue;
  1362.         StoreObj.options[ESix+6].text = EvEmNotify; 
  1363.         StoreObj.options[ESix+7].text = EvPhNotify; 
  1364.         StoreObj.options[ESix+8].text = EvProNotify; 
  1365.         StoreObj.options[ESix+9].text = EvPgNotify; //+9
  1366.         StoreObj.options[ESix+10].text = EvThresh; 
  1367.         StoreObj.options[ESix+11].text = EvOver; 
  1368.         StoreObj.options[ESix+12].text = EvDur; //+12
  1369.         outputLogEvent(StoreObj,ESix); // go output to Log Window if eligible
  1370.         for ( var i=0; i<EventRecLength; i++ ) { // remove from temporary store
  1371.             StoreObj.remove(ESix);   
  1372.         }
  1373.     }
  1374. }
  1375.  
  1376. function AlertEventLupRec2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver) {
  1377.     StoreObj = VA_EventStore; // Storage
  1378.     if ( IsEventExist(EvID) == false ) { // if not received yet
  1379.         // allocate space for Part 1
  1380.         addElementToSelect(StoreObj,EvID); //+0
  1381.         addElementToSelect(StoreObj,"");
  1382.         addElementToSelect(StoreObj,"");
  1383.         addElementToSelect(StoreObj,"");
  1384.         addElementToSelect(StoreObj,""); 
  1385.         addElementToSelect(StoreObj,""); //+5
  1386.         addElementToSelect(StoreObj,""); 
  1387.         addElementToSelect(StoreObj,""); 
  1388.         addElementToSelect(StoreObj,""); 
  1389.         addElementToSelect(StoreObj,""); //+9
  1390.         addElementToSelect(StoreObj,""); 
  1391.         addElementToSelect(StoreObj,""); 
  1392.         addElementToSelect(StoreObj,""); //+12 
  1393.         /* save Part 2 */
  1394.         addElementToSelect(StoreObj,EvCmpID); //+13
  1395.         addElementToSelect(StoreObj,EvAlGrpID); 
  1396.         addElementToSelect(StoreObj,EvObjDesc);
  1397.         addElementToSelect(StoreObj,EvCntrDesc);
  1398.         addElementToSelect(StoreObj,EvCmpDesc); //+17
  1399.     }
  1400.     else { // already received Part 1, update Part 2
  1401.         ESix = EventSelectIdx * EventRecLength;
  1402.         StoreObj.options[ESix+13].text = EvCmpID;
  1403.         StoreObj.options[ESix+14].text = EvAlGrpID;
  1404.         StoreObj.options[ESix+15].text = EvObjDesc;
  1405.         StoreObj.options[ESix+16].text = EvCntrDesc;
  1406.         StoreObj.options[ESix+17].text = EvCmpDesc;
  1407.         outputLogEvent(StoreObj,ESix); // go output to Log Window if eligible
  1408.         for ( var i=0; i<EventRecLength; i++ ) { // remove from temporary store
  1409.             StoreObj.remove(ESix);   
  1410.         }
  1411.     }
  1412. }
  1413.  
  1414. var LogEventBsy = false;
  1415. /* Check if Event Passes Filter Test and if so, Output to Log Window */
  1416. function outputLogEvent(ESObj,ESx) {
  1417.     if ( ESObj == null ) { // Service Alert or User Alert Event
  1418.         var warr = new Array();
  1419.           var SLRec = new Array();
  1420.         var warr1 = new Array();
  1421.         
  1422.           SLRec = ESx.split("~"); // parse the Log Record
  1423.           if ( SLRec[0] == "EventLog" ) { // process EventLog Alert
  1424.             EGid = SLRec[4]; // Alert Group ID
  1425.             ECmn = curServAlertCompNme; // Computer Name
  1426.             ECmd = curServAlertCompDesc; // Cmp Desc
  1427.             EOn = EOvr = ""; // Obj Name, Over 
  1428.             warr = SLRec[6].split("/"); // Time Stamp
  1429.             warr[0] = ""+parseInt(warr[0],10);
  1430.             warr[1] = ""+parseInt(warr[1],10);
  1431.             ETs = warr.join("/");
  1432.             Eid = SLRec[1]+"~"+SLRec[4]; // Event ID 
  1433.             Ev = SLRec[11]; // Status Code = Event ID
  1434.             // make sure complete message has no single quote characters
  1435.             warr.length =0;
  1436.             warr = SLRec[12].split("'"); 
  1437.             SLRec[12] = warr.join("`");
  1438.             
  1439.          var darr = new Array();
  1440.          darr = SLRec[12].split("\x0d\x0a\x0a\x0d\x0a\x0a");
  1441.          SLRec[12] = darr.join("\x0a");
  1442.          darr = SLRec[12].split("\x0d\x0a\x0a");
  1443.          SLRec[12] = darr.join("\x0a");
  1444.             
  1445.             AEV = "EvSrc: "+SLRec[9]+"; EvCat: "+SLRec[10]+"; EvDesc: "+SLRec[12]; // Status string= Source, Category, & Comp Message
  1446.             var EvLTyp = "";
  1447.             if ( SLRec[8] == "1" ) { EvLTyp = "Error"; }
  1448.             else if ( SLRec[8] == "2" ) { EvLTyp = "Warning"; }
  1449.             else if ( SLRec[8] == "4" ) { EvLTyp = "Information"; }
  1450.             else if ( SLRec[8] == "8" ) { EvLTyp = "Security"; }
  1451.             ECON = ECn = "EvLog "+SLRec[7]+" / "+EvLTyp; // Event Log Name & Type
  1452.             ECONT = "";
  1453.         }
  1454.           else if ( SLRec[0] == "ProcessCheckLog" ) { // process Process Check Alert
  1455.             EGid = SLRec[4]; // Alert Group ID
  1456.             ECmn = curServAlertCompNme; // Computer Name
  1457.             ECmd = curServAlertCompDesc; // Cmp Desc
  1458.             EOn = EOvr = ""; // Obj Name, Over 
  1459.             warr = SLRec[6].split("/"); // Time Stamp
  1460.             warr[0] = ""+parseInt(warr[0],10);
  1461.             warr[1] = ""+parseInt(warr[1],10);
  1462.             ETs = warr.join("/");
  1463.             Eid = SLRec[1]+"~"+SLRec[4]; // Event ID 
  1464.             Ev = SLRec[12]; // Status Code 
  1465.             
  1466.             var pPID = "", pDuration = "";
  1467.             if ( SLRec[18] != "" ) {
  1468.                var prarr = new Array();
  1469.                prarr = SLRec[18].split("[]");
  1470.                pPID = prarr[0];
  1471.                pDuration = prarr[1];
  1472.             }
  1473.  
  1474.             AEV = GetProcessCheckStatus(SLRec[12]);
  1475.             if ( pPID != "" ) {
  1476.                AEV += "; PID="+pPID;
  1477.             }
  1478.             if ( pDuration != "" ) {
  1479.                AEV += "; Duration="+pDuration;
  1480.             }
  1481.             AEV += "; CPU%= "+SLRec[7]+"; Memory= "+SLRec[8];
  1482.             AEV += "KB; PPool= "+SLRec[9]+"KB; NPPool= "+SLRec[10]+"KB; PFile= "+SLRec[11]+"KB ;";
  1483.             AEV += "Thresholds: CPU%= "+SLRec[13]+"; Memory= "+SLRec[14];
  1484.             AEV += "KB; PPool= "+SLRec[15]+"KB; NPPool= "+SLRec[16]+"KB; PFile= "+SLRec[17]+"KB";
  1485.             ECON = ECn = "ProcessWatch- "+ SLRec[5] ;
  1486.             if ( ECON.length > 27 ) {
  1487.                 ECONT = ECON; // set for display in the title
  1488.                 ECON = ECON.substring(0,27) + "...";   
  1489.             }
  1490.             else {
  1491.                ECONT = "";
  1492.             }
  1493.         } 
  1494.         else if ( SLRec[0] == "FileCheckLog" ) { // process File Check Alert
  1495.             EGid = SLRec[4]; // Alert Group ID
  1496.             ECmn = curServAlertCompNme; // Computer Name
  1497.             ECmd = curServAlertCompDesc; // Cmp Desc
  1498.             EOn = EOvr = ""; // Obj Name, Over 
  1499.             warr = SLRec[10].split("/"); // Time Stamp
  1500.             warr[0] = ""+parseInt(warr[0],10);
  1501.             warr[1] = ""+parseInt(warr[1],10);
  1502.             ETs = warr.join("/");
  1503.             Eid = SLRec[1]+"~"+SLRec[4]; // Event ID 
  1504.             Ev = SLRec[8]; // Status Code 
  1505.             AEV = GetFileCheckStatus(SLRec[8]) + " FileSize="+SLRec[6]+"KB; SearchString="+SLRec[7]+"; FileD/T="+SLRec[9];
  1506.             ECON = ECn = "FileWatch- "+ SLRec[5] ;
  1507.             if ( ECON.length > 27 ) {
  1508.                 ECONT = ECON; // set for display in the title
  1509.                 ECON = ECON.substring(0,27) + "...";   
  1510.             }
  1511.             else {
  1512.                ECONT = "";
  1513.             }
  1514.         }
  1515.        else if ( SLRec[0] == "SyslogCheckLog" ) { // process Syslog Check Alert
  1516.             EGid = SLRec[4]; // Alert Group ID
  1517.             ECmn = curServAlertCompNme; // Computer Name
  1518.             ECmd = curServAlertCompDesc; // Cmp Desc
  1519.             EOn = EOvr = ""; // Obj Name, Over 
  1520.             warr = SLRec[10].split("/"); // Time Stamp
  1521.             warr[0] = ""+parseInt(warr[0],10);
  1522.             warr[1] = ""+parseInt(warr[1],10);
  1523.             ETs = warr.join("/");
  1524.             Eid = SLRec[1]+"~"+SLRec[4]; // Event ID 
  1525.             Ev = SLRec[5]+" / "+SLRec[6]; // Status Code 
  1526.             warr.length =0;
  1527.             warr = SLRec[9].split("'"); 
  1528.             SLRec[9] = warr.join("`");
  1529.             AEV = "Facility="+GetFacility(SLRec[5])+"; Severity="+GetSeverity(SLRec[6])+"; Message="+SLRec[9];
  1530.             ECON = ECn = "SYSLOG- "+ SLRec[8] ;
  1531.             if ( ECON.length > 27 ) {
  1532.                 ECONT = ECON; // set for display in the title
  1533.                 ECON = ECON.substring(0,27) + "...";   
  1534.             }
  1535.             else {
  1536.                ECONT = "";
  1537.             }
  1538.         }
  1539.          else if ( SLRec[0] == "WinServicesLog" ) { // process Win Services Alert
  1540.             EGid = SLRec[2]; // Alert Group ID
  1541.             ECmn = curServAlertCompNme; // Computer Name
  1542.             ECmd = curServAlertCompDesc; // Cmp Desc
  1543.             EOn = EOvr = ""; // Obj Name, Over 
  1544.             warr = SLRec[5].split("/"); // Time Stamp
  1545.             warr[0] = ""+parseInt(warr[0],10);
  1546.             warr[1] = ""+parseInt(warr[1],10);
  1547.             ETs = warr.join("/");
  1548.             Eid = SLRec[1]+"~"+SLRec[2]; // Event ID 
  1549.             Ev = SLRec[3]; // Status Code 
  1550.             if (  Ev == "0" ) {
  1551.                 AEV = "Notified Only";
  1552.             }
  1553.             else if ( Ev == "1" ) {
  1554.                 AEV = "Service Restarted";
  1555.             }
  1556.             else {
  1557.                 AEV = SLRec[4]; // info
  1558.             }
  1559.             var WSAix = (parseInt(SLRec[7],10)-1) * WinServicesArrEntrySz; // get index to Service Array entry
  1560.             ECON = ECn = "WinService- "+ WinServicesArr[WSAix+2] + " ("+ WinServicesArr[WSAix+1] +")";
  1561.             if ( ECON.length > 27 ) {
  1562.                 ECONT = ECON; // set for display in the title
  1563.                 ECON = ECON.substring(0,27) + "...";   
  1564.             }
  1565.             else {
  1566.                ECONT = "";
  1567.             }
  1568.         }
  1569.        else if ( SLRec[0] == "SNMPTrap" ) { // process SNMPTrap Alert
  1570.            var rl = SLRec.length
  1571.             EGid = SLRec[rl-2]; // Alert Group ID
  1572.             ECmn = curServAlertCompNme; // Computer Name
  1573.             ECmd = curServAlertCompDesc; // Cmp Desc
  1574.             EOn = EOvr = ""; // Obj Name, Over 
  1575.             warr = SLRec[6].split("/"); // Time Stamp
  1576.             warr[0] = ""+parseInt(warr[0],10);
  1577.             warr[1] = ""+parseInt(warr[1],10);
  1578.  
  1579.             warr1 = warr[2].split(":");
  1580.             warr1[1] = ( warr1[1].length > 1 ) ? warr1[1] : "0"+warr1[1];
  1581.             warr1[2] = ( warr1[2].length > 1 ) ? warr1[2] : "0"+warr1[2];
  1582.             warr[2] = warr1.join(":");
  1583.             
  1584.             ETs = warr.join("/");
  1585.             Eid = SLRec[1]+"~"+SLRec[7]; // Event ID 
  1586.             Ev = SLRec[8]; // Status Code = VB Count
  1587.             
  1588.             var VarBind = " ";
  1589.             if ( SLRec.length > 13 ) { // if Variable Binding info
  1590.                var VBCount = parseInt( SLRec[11], 10 );
  1591.                for ( var i=0; i<VBCount; i++ ) {
  1592.                    VarBind += SLRec[12+i+i];
  1593.                    VarBind += ", "+SLRec[13+i+i]+"; ";               
  1594.                 }
  1595.             } 
  1596.  
  1597.             AEV = "From Addr: "+SLRec[3]+"; NotifyOID: "+SLRec[2]+"; UpTime: "+SLRec[4]+"; VariableBindings: "+VarBind; // Status string
  1598.             ECON = ECn = "SNMP Trap-"+getOIDName(SLRec[2]); // Alert Name
  1599.             if ( ECON.length > 30 ) {
  1600.                 ECONT = ECON; // set for display in the title
  1601.                 ECON = ECON.substring(0,30) + "...";   
  1602.             }
  1603.             else {
  1604.                ECONT = "";
  1605.             }
  1606.         }
  1607.           else if ( SLRec[0] == "UserAlert" ) { // process User Alert
  1608.             EGid = SLRec[1]; // Alert Group ID
  1609.             ECmn = SLRec[2]; // Computer Name
  1610.             ECmd = SLRec[3]; // Cmp Desc
  1611.             EOn = EOvr = ""; // Obj Name, Over 
  1612.             var dob = new Date(); // get current d/t
  1613.             var lt = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear();
  1614.             var chrs = ""+dob.getHours(); // current hours
  1615.             var cmin = ""+dob.getMinutes(); // current minutes
  1616.             var csec = ""+dob.getSeconds(); // current seconds
  1617.             lt += " " + ((chrs.length == 1) ? "0"+chrs : chrs) + ":";
  1618.             lt += ((cmin.length == 1) ? "0"+cmin : cmin)+":";
  1619.             lt += ((csec.length == 1) ? "0"+csec : csec);
  1620.             ETs = lt; // D/T stamp
  1621.             Eid = SLRec[1]+"~"+SLRec[2]; // Event ID 
  1622.             Ev = ""; // Status Code
  1623.             AEV = ""; // Status string
  1624.             ECON = ECn = "User Alert"; // Service Name
  1625.             ECONT = "";
  1626.         }
  1627.          else { // Service Alert
  1628.             Eid = SLRec[0]+"~"+SLRec[2]; // Event ID = ServiceRecID~AlertGroupID
  1629.             EGid = SLRec[2]; // Alert Group ID
  1630.             ECmn = curServAlertCompNme; // Computer Name
  1631.             ECmd = curServAlertCompDesc; // Cmp Desc
  1632.             warr = SLRec[5].split("/"); // Time Stamp
  1633.             warr[0] = ""+parseInt(warr[0],10);
  1634.             warr[1] = ""+parseInt(warr[1],10);
  1635.             ETs = warr.join("/");
  1636.             EOn = EOvr = ""; // Obj Name, Over 
  1637.             Ev = SLRec[7]; // Status Code
  1638.             // make sure complete message has no single quote characters
  1639.             warr.length =0;
  1640.             warr = SLRec[6].split("'"); 
  1641.             SLRec[6] = warr.join("`");
  1642.             AEV = SLRec[6]; // Status string
  1643.             
  1644.             if ( SLRec[4] == "AGENT" ) {
  1645.                if ( AEV.indexOf("Page File") != -1 ) {
  1646.                    Ev = "2";
  1647.                 }
  1648.                 else if ( AEV.indexOf("Logical") != -1 ) {
  1649.                    Ev = "3";
  1650.                 }
  1651.             }
  1652.             
  1653.             ECON = ECn = (SLRec[4] == "SQLCONNECT") ? "SQL" : SLRec[4]; // Service Name
  1654.             ECONT = "";
  1655.         }
  1656.     }
  1657.     else {
  1658.         EGid = ESObj.options[ESx+14].text; // Alert Group ID
  1659.         CID = ESObj.options[ESx+13].text; // Computer ID
  1660.         ETs = ESObj.options[ESx+1].text; // Time Stamp
  1661.         if ( IsDisplayInLog(EGid,CID,ETs) == false )
  1662.             return; // Didn't pass filter test
  1663.  
  1664.         /* Check for duplicate by comparing versus Event ID array */
  1665.         var EidArr = new Array();     
  1666.         EidArr = ELogParams.logeventid.split(",");
  1667.         Eid = StoreObj.options[ESx].text; // Event ID
  1668.         for ( var i=0; i<EidArr.length; i++ ) {
  1669.             if ( Eid == EidArr[i] ) // if match then duplicate
  1670.                return;
  1671.         }
  1672.         ECn = StoreObj.options[ESx+2].text; // Counter Name
  1673.         EOn = StoreObj.options[ESx+3].text; // Object Name
  1674.         ECmn = StoreObj.options[ESx+4].text; // Computer Name
  1675.         Ev = StoreObj.options[ESx+5].text; // Event Value
  1676.         EOd = StoreObj.options[ESx+15].text; // Obj Desc
  1677.         ECd = StoreObj.options[ESx+16].text; // Cntr Desc
  1678.         ECmd = StoreObj.options[ESx+17].text; // Cmp Desc
  1679.         EOvr = StoreObj.options[ESx+11].text; // Over
  1680.         AEV = "Threshold: " + StoreObj.options[ESx+10].text + "; Duration: " + StoreObj.options[ESix+12].text;
  1681.         /* Accomodate Names Larger than Field Size */    
  1682.         ECON = ECn; // counter name
  1683.         if ( ECON.length > 30 ) {
  1684.             ECONT = ECON + "  /  "; // set for display in the title
  1685.             ECON = ECON.substring(0,30) + "...";   
  1686.         }
  1687.         else {
  1688.            ECONT = "";
  1689.         }
  1690.         ECONT += "Object Name : Desc = " + EOn + " : " + EOd;
  1691.         ELogParams.logtime = ETs; // update the D/T stamp    
  1692.     }
  1693.     AEagd = AEad = AEsub = AEpn = PGnbr = PGtext = BPnbr = BPtext = "";
  1694.     ACS = ""; // Action string
  1695.     ACd = ""; // Action description
  1696.     if ( (EAgn = getAlertNameSpecial(EGid)) != "" ) { // Alert Group Name
  1697.         var aix = AlertSelectIdx * AlertRecLength;
  1698.         AEad = AlertStoreArr[aix+15]; // Email Address
  1699.  
  1700.         var est = AlertStoreArr[aix+16];
  1701.         var estarr = new Array();
  1702.         estarr = est.split("[+]");
  1703.         AEsub = estarr[0]; // Email Subject
  1704.         
  1705.         AEpn = AlertStoreArr[aix+12]; // Program Name
  1706.         
  1707.         PGnbr = AlertStoreArr[aix+18]; // AlphaPage Number
  1708.         PGtext = AlertStoreArr[aix+19]; // AlphaPage TexttoSend
  1709.         
  1710.         BPnbr = AlertStoreArr[aix+21]; // Beeper Nmbr
  1711.         BPtext = AlertStoreArr[aix+22]; // Beeper Texttosend
  1712.  
  1713.         AEagd = AlertStoreArr[aix+2]; // Alert Group Desc
  1714.  
  1715.         if (AlertStoreArr[aix+14] == "1") { // EmailNotify?
  1716.             ACS += "Email Sent; ";
  1717.             ACd += "EmailAddress: " + AEad + "; EmailSubject: " + AEsub + "; ";
  1718.         }
  1719.         if    (AlertStoreArr[aix+11] == "1") { // Program Execution?
  1720.             ACd += "Program Run At "
  1721.             if ( AEpn.charAt(0) == ">" ) { // execute remotely?
  1722.                 ACd += "Monitored Server/Computer";
  1723.                 AEpn = AEpn.substring(1,AEpn.length); // strip off ">"
  1724.                 if ( AEpn == '"RESTART"' ) {
  1725.                     AEpn = "Monitored Server/Computer Restarted";
  1726.                     ACS += "Computer Rebooted; "
  1727.                 }
  1728.                 else {
  1729.                     ACS += "Program Run; ";
  1730.                 }
  1731.             }
  1732.             else {
  1733.                 ACS += "Program Run; ";
  1734.                 ACd += "MonitorIT Server";
  1735.             }
  1736.  
  1737.             ACd += "; ProgramName: " + AEpn +"; ";;
  1738.         }
  1739.         if (AlertStoreArr[aix+17] == "1") { // AlphaPager?
  1740.             ACS += "Alpha Pager Called; ";
  1741.             ACd += "PagerNumber: "+ PGnbr + "; PagerText: "+ PGtext +"; ";
  1742.         }
  1743.         if    (AlertStoreArr[aix+20] == "1") { // Beeper?
  1744.             ACS += "Beeper Called "
  1745.             ACd += "BeeperNumber: "+ BPnbr + "; BeeperText: "+ BPtext +"; ";
  1746.         }
  1747.         if ( ESObj == null ) {        
  1748.             if ( SLRec[0] == "WinServicesLog" && Ev == "1" ) {
  1749.                 ACS += "Service Restarted; ";
  1750.             }
  1751.         }
  1752.     }
  1753.     if ( ACS == "" ) {
  1754.           ACS = "No Actions Taken";
  1755.     }
  1756.  
  1757.     processAlertAudioOut(); // process AudioAlert
  1758.  
  1759.     /* Accomodate Names Larger than Field Size */    
  1760.     if ( ECmn.length > 30 ) { // Computer Name
  1761.         ECmnT = ECmn + "  / "; // set for display in the title
  1762.         ECmn = ECmn.substring(0,30) + "...";   
  1763.     }
  1764.     else {
  1765.        ECmnT = "";
  1766.     }
  1767.     if ( ECmd.charAt(ECmd.length-1) == "." ) {
  1768.         ECmd = ECmd.substring(0,ECmd.length-1);
  1769.     }
  1770.     ECmnT +=  ECmd + ";  Watch/Alert Name = " + EAgn;
  1771.     
  1772.     if ((ELBgFlg ^= 1) == 0) {
  1773.         FOps = "<div style='background-color:white'>";
  1774.     }
  1775.     else {
  1776.         FOps = "<div style='background-color:e8e8e8'>";
  1777.     }
  1778.     FOps += "<table border='0' cellpadding='0' cellSpacing='1' width='100%'";
  1779.     if ( EOvr == "0") { // if Event over threshold
  1780.         FOps += " style='color:red'";
  1781.     }
  1782.     FOps += "><tr>";    
  1783.     FOps += "<td width='170' colspan='1' align='left' class='optext' style='cursor:hand' title='" + ECmnT + "'>";
  1784.     FOps += ECmn + "</td>";
  1785.     FOps += "<td width='170' colspan='1' align='left' class='optext' style='cursor:hand' title='" + ECONT + "'>";
  1786.     FOps += ECON + "</td>";
  1787.     FOps += "<td width='106' colspan='1' align='left' class='optext'>";
  1788.     FOps += ETs + "</td>";
  1789.     FOps += "<td width='65' colspan='1' align='left' class='optext' style='cursor:hand' title='" + AEV + "' >";
  1790.     FOps += Ev + "</td>";
  1791.     FOps += "<td width='*' colspan='1' align='left' class='optext' style='cursor:hand' title='" + ACd + "'>";
  1792.     FOps += ACS + "</td>"
  1793.     FOps += "</tr></table></div>";
  1794.     ELogText.insertAdjacentHTML("afterBegin",FOps);
  1795.     //ELogWin.scrollIntoView();
  1796.     ELogParams.logeventid += Eid + ","; // update the Event ID Array
  1797.    //ClearButton.className = "BoxButton"; // enable button
  1798.    ClearButton.disabled = ""; // enable button   
  1799.    //StatusPrintButton.className = "BoxButton"; // enable button
  1800.    StatusPrintButton.disabled = ""; // enable button   
  1801.    LogEventBsy = false; // set free
  1802. }
  1803.  
  1804. /* Get Alert Name from Store based on Alert ID */
  1805. function getAlertNameSpecial(UID) {
  1806.     AlertName = "";
  1807.     for (i=0, j=0; i < AlertStoreArr.length; ++j, i+=AlertRecLength) {
  1808.         if ( AlertStoreArr[i+1] == UID ) {
  1809.             AlertName = AlertStoreArr[i];
  1810.             AlertSelectIdx = j;
  1811.             break;
  1812.         }
  1813.     }
  1814.     return AlertName;
  1815. }
  1816.  
  1817. /* Get Event Name from Store based on Event ID */
  1818. function IsEventExist(EID) {
  1819.     ENobj = VA_EventStore; // get object
  1820.     for (var i=0, j=0; i < ENobj.length; ++j, i+=EventRecLength) {
  1821.         if ( ENobj.options[i].text == EID ) {
  1822.             EventSelectIdx = i;
  1823.             return true;
  1824.           }
  1825.     }
  1826.     return false;
  1827. }
  1828.  
  1829. /* Process DB Error in Alert Lookup Operation */
  1830. function processAlertEventOpComplete() {
  1831.     ATid = setTimeout("processCounterAlert()",1500); // Delay 1.5 secs then process
  1832. }
  1833.  
  1834. /* Process Populate Configure Edit Fields */
  1835. var Tops = ""; // output string
  1836. var SBObj = null; // SelectBox Object for output
  1837. var OCArray = new Array(); // ComputerID,ObjectID pair array
  1838. var CkCArr = new Array(); // "Checked" Computers array
  1839. var curServName = null; // Current Service Name
  1840. var CTparm = "optext"; // Computer Text Color
  1841. var CurrentAlertType = null;
  1842. function populateInput(idx) {
  1843.     SetCursor("wait");
  1844.     setSelectAll(false); // disable Select/UnselectAll buttons
  1845.     CurAlertName = AlertStoreArr[idx];
  1846.     CurAlertID = AlertStoreArr[idx+1];
  1847.     CurAlertDesc = AlertStoreArr[idx+2];
  1848.     CkCArr.length = 0; // init checked computer array
  1849.     curServName = ""; // initialize
  1850.     CountOfComps = 0; // clear
  1851.     // If Service, preset Start and End D to today
  1852.     var dob = new Date(); // get current d/t
  1853.     var calt = AlertStoreArr[idx+10];
  1854.     if ( calt == "" || calt == "SNMPTrap" || calt == "UserAlert" || calt == "EventLog" || calt == "WinService" || calt == "FileCheck" || calt == "SyslogCheck" || calt == "ProcessCheck") { // if Service, SNMP Trap, EventLog or User
  1855.         CurrentAlertType = "S"; // set Service type
  1856.         if ( AlertStoreArr[idx+8] == "01/01/1999 11:50:00" || AlertStoreArr[idx+8] == "1/1/1999 11:50:0" || calt == "UserAlert" ) { // if User
  1857.             AlertStoreArr[idx+10] = "UserAlert";
  1858.             CurrentAlertType = "U"; // "User" type
  1859.         }
  1860.         else if ( AlertStoreArr[idx+8] == "01/01/1999 11:40:00" || AlertStoreArr[idx+8] == "1/1/1999 11:40:0" || calt == "EventLog" ) { 
  1861.             AlertStoreArr[idx+10] = "EventLog";
  1862.             CurrentAlertType = "E"; // "Event Log" type
  1863.         }
  1864.         else if ( AlertStoreArr[idx+8] == "01/01/1999 11:20:00" || AlertStoreArr[idx+8] == "1/1/1999 11:20:0" || calt == "SNMPTrap" ) { 
  1865.             AlertStoreArr[idx+10] = "SNMPTrap";
  1866.             CurrentAlertType = "T"; // "SNMP Trap" type
  1867.         }
  1868.         else if ( AlertStoreArr[idx+8] == "01/01/1999 11:10:00" || AlertStoreArr[idx+8] == "1/1/1999 11:10:0" || calt == "WinService" ) { 
  1869.             AlertStoreArr[idx+10] = "WinService";
  1870.             CurrentAlertType = "W"; // "Win Service" type
  1871.         }
  1872.         else if ( AlertStoreArr[idx+8] == "01/01/1999 11:00:00" || AlertStoreArr[idx+8] == "1/1/1999 11:0:0" || calt == "FileCheck" ) { 
  1873.             AlertStoreArr[idx+10] = "FileCheck";
  1874.             CurrentAlertType = "F"; // "File Check" type
  1875.         }
  1876.         else if ( AlertStoreArr[idx+8] == "01/01/1999 11:12:00" || AlertStoreArr[idx+8] == "1/1/1999 11:12:0" || calt == "ProcessCheck" ) { 
  1877.             AlertStoreArr[idx+10] = "ProcessCheck";
  1878.             CurrentAlertType = "P"; // "Process Check" type
  1879.         }
  1880.         else if ( AlertStoreArr[idx+8] == "01/01/1999 11:15:00" || AlertStoreArr[idx+8] == "1/1/1999 11:15:0" || calt == "SyslogCheck" ) { 
  1881.             AlertStoreArr[idx+10] = "SyslogCheck";
  1882.             CurrentAlertType = "L"; // "File Check" type
  1883.         }
  1884.  
  1885.         AlertStoreArr[idx+8] = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear() + " 0:0:0";
  1886.         AlertStoreArr[idx+9] = "12/31/2030 23:59:59";
  1887.     }
  1888.     else { // Counter type
  1889.         CurrentAlertType = "C"; // "Counter" Alert type
  1890.         if ( AlertStoreArr[idx+8] == "01/01/1999 11:59:00" || AlertStoreArr[idx+8] == "1/1/1999 11:59:0" ) {
  1891.             CTparm = "optextr";
  1892.         }
  1893.         else {
  1894.             CTparm = "optext";
  1895.         }
  1896.     }
  1897.             
  1898.     /* Check if Entry exists in the Filter */
  1899.     FilObj = VA_FilterStore; // Filter Store
  1900.     if ( getFilterEntry(CurAlertID) != null ) { // if entry in the filter
  1901.         i = FilterSelectIdx; // index to found entry
  1902.         CkCArr = FilObj.options[i+1].text.split(","); // get checked CIDs
  1903.         
  1904.         msec = eval(FilObj.options[i+3].text);
  1905.         dob = new Date(msec);
  1906.         AlertStoreArr[idx+8] = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear() + " " + dob.getHours()+":"+dob.getMinutes()+":"+dob.getSeconds();
  1907.         msec = eval(FilObj.options[i+5].text);
  1908.         dob = new Date(msec);    
  1909.         AlertStoreArr[idx+9] = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear() + " " + dob.getHours()+":"+dob.getMinutes()+":"+dob.getSeconds();
  1910.     }
  1911.     
  1912.     /* Determine Start D */
  1913.     i = AlertStoreArr[idx+8];
  1914.     Ia = i.split(" "); // get Start date and time
  1915.     var Ib = new Array();
  1916.     Ib = Ia[0].split("/");
  1917.     dob = new Date(Ib[2],(Ib[0]-1),Ib[1]);
  1918.     VA_StartDate.value = " " + dowArray[dob.getDay()] + "  " + Ia[0]; // Date
  1919.     baseDay = dob.getDate(); // Set base date based on Start Date
  1920.     baseMonth = dob.getMonth();
  1921.     baseYear = dob.getFullYear();
  1922.  
  1923.     /* Determine Stop D */
  1924.     i = AlertStoreArr[idx+9];
  1925.     Ia = i.split(" "); // get Stop date and time
  1926.     Ib = Ia[0].split("/");
  1927.     dob = new Date(Ib[2],(Ib[0]-1),Ib[1]);
  1928.     VA_StopDate.value = " " + dowArray[dob.getDay()] + "  " + Ia[0]; // Date
  1929.  
  1930.    /* setup Object:Counter info for display */
  1931.    SBObj = VA_Select;
  1932.     SBObj.innerHTML = ""; // clear current display
  1933.  
  1934.     // get Computers,Object,Counter to an Array
  1935.     OCArray = AlertStoreArr[idx+10].split(";"); 
  1936.     if ( CurrentAlertType == "S" ) { // Service type
  1937.         var srvcarr = new Array();
  1938.         /* Compute Array of Computer IDs */
  1939.         CompIdLupArr = ""; // Computer Id Array
  1940.        for ( var i=0,j=0,srvcix; i<AC_ServicesStoreArr.length; i+=ServicesRecLength ) {
  1941.            if ( AC_ServicesStoreArr[i+1] == CurAlertID ) {
  1942.                srvcix = i; // save found index for typical entry
  1943.                 if ( j > 0) {
  1944.                    CompIdLupArr += ","; // array id separator
  1945.                 }
  1946.                 else {
  1947.                     srvcarr = AC_ServicesStoreArr[i+3].split("~");
  1948.                     CTparm = ( srvcarr[11] == "1" ) ? "optextr" : "optext";
  1949.                 }
  1950.                 CompIdLupArr += AC_ServicesStoreArr[i];
  1951.                   ++j; // bump computer count
  1952.            }
  1953.         }
  1954.         if ( (MaxCmpCount = j) == 0 ) { // if no computers, invalid AlertGroup
  1955.             top.Rstatus.Pstat("Error. Computer ID Array Empty and No Services Found",true);
  1956.             return; 
  1957.         }
  1958.         curServName = AC_ServicesStoreArr[srvcix+2]; // current Service Name
  1959.         SBObj.style.overflow = ( j > 4 ) ? "scroll" : "";
  1960.         Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  1961.         Tops += "<tr><td width='5'> </td>";
  1962.         Tops += "<td width='19' align='center'><img src='images/sAdminServers.gif' width='16' height='16'></td>";
  1963.         Tops += "<td width='*' class='optext'>" + curServName + "</td>";
  1964.         Tops += "</tr></table>";
  1965.         CountOfComps = 0; // initialize
  1966.         ALupMode = "EventPopIn";
  1967.         processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions
  1968.     }
  1969.     else if ( CurrentAlertType == "U" ) { // if User Alert
  1970.         var wstrg = "Unchecked"; // default
  1971.         if ( getFilterEntry(CurAlertID) != null ) { // if entry in the filter
  1972.             wstrg = "Checked";
  1973.         }    
  1974.         Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  1975.         Tops += "<tr id='usralt0' checked='0' style='cursor:hand' onclick='procUsrAltClick(this)'><td width='5'> </td>";
  1976.         Tops += "<td width='36' align='center'><img src='images/monitoritalert.gif' width='32' height='32'  ></td>";
  1977.         Tops += "<td width='13' align='center'><img id='usralt1' src='images/"+wstrg+".gif'";
  1978.           Tops += " width='9' height='9'></td>";
  1979.         Tops += "<td width='*' class='optext'> User Alert </td>";
  1980.         Tops += "</tr></table>";
  1981.         processPopulateInputOpComplete();
  1982.     }    
  1983.     else if ( CurrentAlertType == "E" ) { // if Event Log
  1984.         if ( RpmCC_VA.ELMonitorLookupByAlertGroup(CurAlertID) ) {
  1985.             ALupMode = "";
  1986.             top.Rstatus.Pstat("Unable to start the EventLogWatch Computer LOOKUP request",true);
  1987.             return;
  1988.         }
  1989.         else {
  1990.             VA_CommBusy = 1; // set Comm busy flag
  1991.             CountOfCompsRcvd = 0; 
  1992.             CompIdLupArr = ""; // Computer Id Array
  1993.             ALupMode = "ELComputerLookupPopIn"; // Mode
  1994.             top.Rstatus.Pstat("One moment while Computer LOOKUP request completes");
  1995.         }
  1996.     }
  1997.     else if ( CurrentAlertType == "T" ) { // if SNMP Trap
  1998.         if ( RpmCC_VA.SnmpTrapMonitorFindByAGId(CurAlertID) ) { // if unable to initiate request        
  1999.             ALupMode = "";
  2000.             top.Rstatus.Pstat("Unable to start the SNMPTrapWatch Computer LOOKUP request",true);
  2001.         }
  2002.         else {
  2003.             VA_CommBusy = 1; // set Comm busy flag
  2004.             CountOfCompsRcvd = 0; 
  2005.             CompIdLupArr = ""; // Computer Id Array
  2006.             ALupMode = "SNMPTrapComputerLookupPopIn"; // Mode
  2007.             top.Rstatus.Pstat("One moment while SNMPTrapWatch Computer LOOKUP request completes");
  2008.         }
  2009.     }
  2010.     else if ( CurrentAlertType == "W" ) { // if Win Service
  2011.         if ( RpmCC_VA.NTServicesMonitorLookupAGID(CurAlertID) ) { // if unable to initiate request        
  2012.             ALupMode = "";
  2013.             top.Rstatus.Pstat("Unable to start the WinServicesWatch Computer LOOKUP request",true);
  2014.         }
  2015.         else {
  2016.             VA_CommBusy = 1; // set Comm busy flag
  2017.             CountOfCompsRcvd = 0; 
  2018.             CompIdLupArr = ""; // Computer Id Array
  2019.             ALupMode = "WSTComputerLookupPopIn"; // Mode
  2020.             top.Rstatus.Pstat("One moment while WinServicesWatch Computer LOOKUP request completes");
  2021.         }
  2022.     }
  2023.     else if ( CurrentAlertType == "F" ) { // if File Check
  2024.         if ( RpmCC_VA.FileCheckLookup(CurAlertID) ) {
  2025.             ALupMode = "";
  2026.             top.Rstatus.Pstat("Unable to start the FileWatch Computer lookup request",true);
  2027.         }
  2028.         else {
  2029.             VA_CommBusy = 1; // set Comm busy flag
  2030.             CountOfCompsRcvd = 0; 
  2031.             CompIdLupArr = ""; // Computer Id Array
  2032.             ALupMode = "FCComputerLookupPopIn"; // Mode
  2033.             top.Rstatus.Pstat("One moment while FileWatch Computer lookup request completes");
  2034.         }
  2035.     }
  2036.     else if ( CurrentAlertType == "P" ) { // if Process Check
  2037.         if ( RpmCC_VA.ProcessCheckLookup(CurAlertID) ) {
  2038.             ALupMode = "";
  2039.             top.Rstatus.Pstat("Unable to start the ProcessWatch Computer lookup request",true);
  2040.         }
  2041.         else {
  2042.             VA_CommBusy = 1; // set Comm busy flag
  2043.             CountOfCompsRcvd = 0; 
  2044.             CompIdLupArr = ""; // Computer Id Array
  2045.             ALupMode = "PCComputerLookupPopIn"; // Mode
  2046.             top.Rstatus.Pstat("One moment while ProcessWatch Computer lookup request completes");
  2047.         }
  2048.     }
  2049.     else if ( CurrentAlertType == "L" ) { // if Syslog Check
  2050.         if ( RpmCC_VA.SyslogCheckLookup(CurAlertID) ) {
  2051.             ALupMode = "";
  2052.             top.Rstatus.Pstat("Unable to start the SyslogWatch lookup request",true);
  2053.         }
  2054.         else {
  2055.             VA_CommBusy = 1; // set Comm busy flag
  2056.             CountOfCompsRcvd = 0; 
  2057.             CompIdLupArr = ""; // Computer Id Array
  2058.             ALupMode = "SLComputerLookupPopIn"; // Mode
  2059.             top.Rstatus.Pstat("One moment while SyslogWatch Computer lookup request completes");
  2060.         }
  2061.     }
  2062.     else { // must be Object:Counter
  2063.         var WrkArr = new Array(); // working array
  2064.         // get Obj ID from first triplet of "CompId.ObjId,CntrId"
  2065.         WrkArr = OCArray[0].split(","); 
  2066.         CurObjID = WrkArr[1]; // Get Object ID; Set CurObjIx
  2067.         CurCntrID = WrkArr[2]; // Get Counter ID
  2068.     
  2069.         if ( RpmCC_VA.ObjectLookupForObjCompArray(CurObjID) ) {
  2070.             top.Rstatus.Pstat("Unable to start the Object LOOKUP request",true);
  2071.         }
  2072.         else {
  2073.             VA_CommBusy = 1; // set Comm busy flag
  2074.             top.Rstatus.Pstat("One moment while Object LOOKUP request completes");
  2075.             ALupMode = "EventPopIn";
  2076.         }
  2077.     }
  2078. }
  2079. function setSelectAll(sFlag) {
  2080.     if ( sFlag ) { 
  2081.        SButtonState(bSelC,"0");
  2082.        SButtonState(bUselC,"0");
  2083.    }
  2084.    else { // otherwise disable the buttons
  2085.        SButtonState(bSelC,"1");
  2086.        SButtonState(bUselC,"1");
  2087.    }
  2088. }
  2089. function SButtonState(BtObj,BState) {
  2090.     //BtObj.className = (BState == "0") ? "BoxButton" : "BoxButtonD";
  2091.     BtObj.disabled = (BState == "0") ? "" : "disabled";
  2092. }
  2093.  
  2094. var CountOfCompsRcvd = 0;
  2095. var LogTable = new Array("Application","Security","System","Directory Service","DNS Server","File Replication Service");
  2096. var CurELName = "";
  2097. function processELMonitorLookupRecord(ELCrec) {
  2098.     var wrkarr = new Array();
  2099.     ++CountOfCompsRcvd;
  2100.     wrkarr = ELCrec.split("~"); // parse the computer record
  2101.     if ( CountOfCompsRcvd > 1 ) { // if not first
  2102.          CompIdLupArr += ","; // Computer Id Array
  2103.     }
  2104.     else {
  2105.         for ( var i=0; i<LogTable.length; i++ ) {
  2106.            if ( LogTable[i] == wrkarr[4] ) {
  2107.                CurELName = wrkarr[4];
  2108.                break;
  2109.            }
  2110.        }
  2111.     }
  2112.     CompIdLupArr += wrkarr[2]; // Computer Id Array
  2113. }
  2114. function processELMonitorOpComplete() {
  2115.     if ( ALupMode == "ELComputerLookupPopIn" ) {
  2116.         if ( CountOfCompsRcvd > 0 ) {
  2117.             MaxCmpCount = CountOfCompsRcvd;
  2118.             SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : "";
  2119.             Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  2120.             Tops += "<tr><td width='5'> </td>";
  2121.             Tops += "<td width='19' align='center'><img src='images/sEventViewer.gif' width='16' height='16'></td>";
  2122.             Tops += "<td width='*' class='optext'>" + CurELName + " Log</td>";
  2123.             Tops += "</tr></table>";
  2124.             CountOfComps = 0; // initialize
  2125.             ALupMode = "EventPopIn";
  2126.             processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions
  2127.         }
  2128.         else {
  2129.             ALMode = ""; // reset mode
  2130.              top.Rstatus.Pstat("No associated computers found for this Event Log alert",true);
  2131.          }
  2132.     }
  2133. }
  2134. function processELMonitorOpError() {
  2135.     top.Rstatus.Pstat("Error reading Event Log Monitor alert parameters",true);
  2136. }
  2137.  
  2138. function processFCLookupOpComplete(FCLStat) {
  2139.     var wrkarr = new Array();
  2140.     wrkarr = FCLStat.split(":"); // parse the lookup record
  2141.     if ( wrkarr[0] == "Err" ) {
  2142.         ALMode = ""; // reset mode
  2143.         top.Rstatus.Pstat(FCLStat,true);
  2144.         return;
  2145.     }
  2146.     wrkarr = FCLStat.split(";"); // parse the lookup record
  2147.     CompIdLupArr = wrkarr[1]; // get Computer ID array
  2148.     wrkarr = CompIdLupArr.split(",");
  2149.     CountOfCompsRcvd = wrkarr.length;
  2150.     if ( CountOfCompsRcvd > 0 ) {
  2151.         MaxCmpCount = CountOfCompsRcvd;
  2152.         SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : "";
  2153.         Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  2154.         Tops += "<tr><td width='5'> </td>";
  2155.         Tops += "<td width='19' align='center'><img src='images/NewImg.gif' width='13' height='13'></td>";
  2156.         Tops += "<td width='*' class='optext'>FileWatch</td>";
  2157.         Tops += "</tr></table>";
  2158.         CountOfComps = 0; // initialize
  2159.         ALupMode = "EventPopIn";
  2160.         processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions
  2161.     }
  2162.     else {
  2163.         ALMode = ""; // reset mode
  2164.         top.Rstatus.Pstat("No associated computers found for this FileWatch alert",true);
  2165.     }
  2166. }
  2167.  
  2168. function processPCLookupOpComplete(FCLStat) {
  2169.     var wrkarr = new Array();
  2170.     wrkarr = FCLStat.split(":"); // parse the lookup record
  2171.     if ( wrkarr[0] == "Err" ) {
  2172.         ALMode = ""; // reset mode
  2173.         top.Rstatus.Pstat(FCLStat,true);
  2174.         return;
  2175.     }
  2176.     wrkarr = FCLStat.split(";"); // parse the lookup record
  2177.     CompIdLupArr = wrkarr[1]; // get Computer ID array
  2178.     wrkarr = CompIdLupArr.split(",");
  2179.     CountOfCompsRcvd = wrkarr.length;
  2180.     if ( CountOfCompsRcvd > 0 ) {
  2181.         MaxCmpCount = CountOfCompsRcvd;
  2182.         SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : "";
  2183.         Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  2184.         Tops += "<tr><td width='5'> </td>";
  2185.         Tops += "<td width='19' align='center'><img src='images/ProcessWatch.gif' width='13' height='13'></td>";
  2186.         Tops += "<td width='*' class='optext'>ProcessWatch</td>";
  2187.         Tops += "</tr></table>";
  2188.         CountOfComps = 0; // initialize
  2189.         ALupMode = "EventPopIn";
  2190.         processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions
  2191.     }
  2192.     else {
  2193.         ALMode = ""; // reset mode
  2194.         top.Rstatus.Pstat("No associated computers found for this ProcessWatch alert",true);
  2195.     }
  2196. }
  2197. function processSLLookupOpComplete(SLLStat) {
  2198.     var wrkarr = new Array();
  2199.     wrkarr = SLLStat.split(":"); // parse the lookup record
  2200.     if ( wrkarr[0] == "Err" ) {
  2201.         ALMode = ""; // reset mode
  2202.         top.Rstatus.Pstat(SLLStat,true);
  2203.         return;
  2204.     }
  2205.     wrkarr = SLLStat.split(";"); // parse the lookup record
  2206.     CompIdLupArr = wrkarr[1]; // get Computer ID array
  2207.     wrkarr = CompIdLupArr.split(",");
  2208.     CountOfCompsRcvd = wrkarr.length;
  2209.     if ( CountOfCompsRcvd > 0 ) {
  2210.         MaxCmpCount = CountOfCompsRcvd;
  2211.         SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : "";
  2212.         Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  2213.         Tops += "<tr><td width='5'> </td>";
  2214.         Tops += "<td width='19' align='center'><img src='images/SyslogDisplaySm.gif' width='13' height='13'></td>";
  2215.         Tops += "<td width='*' class='optext'>SYSLOGWatch</td>";
  2216.         Tops += "</tr></table>";
  2217.         CountOfComps = 0; // initialize
  2218.         ALupMode = "EventPopIn";
  2219.         processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions
  2220.     }
  2221.     else {
  2222.         ALMode = ""; // reset mode
  2223.         top.Rstatus.Pstat("No associated computers found for this SYSLOGWatch alert",true);
  2224.     }
  2225. }
  2226.  
  2227. function processWinServicesClupDone() {
  2228.     if ( ALupMode == "WSTComputerLookupPopIn" ) {
  2229.         if ( CountOfCompsRcvd > 0 ) {
  2230.             MaxCmpCount = CountOfCompsRcvd;
  2231.             SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : "";
  2232.             Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  2233.             Tops += "<tr><td width='5'> </td>";
  2234.             Tops += "<td width='19' align='center'><img src='images/WinServices.gif' width='18' height='18'></td>";
  2235.             Tops += "<td width='*' class='optext'>WinServicesWatch</td>";
  2236.             Tops += "</tr></table>";
  2237.             CountOfComps = 0; // initialize
  2238.             ALupMode = "EventPopIn";
  2239.             processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions
  2240.         }
  2241.         else {
  2242.             ALMode = ""; // reset mode
  2243.              top.Rstatus.Pstat("No associated computers found for this WinServicesWatch alert",true);
  2244.          }
  2245.     }
  2246. }
  2247.  
  2248. function processPopulateSNMPTrapComputerse(coidstrg) {
  2249.     var SNMPTrapCompRecs = new Array;
  2250.     SNMPTrapCompRecs = coidstrg.split(";"); // parse out the Trap Monitor Computer records
  2251.     for ( var i=0; i<SNMPTrapCompRecs.length-1; i++ ) { // process out Trap Monitor records
  2252.         ++CountOfCompsRcvd;
  2253.         warr1 = SNMPTrapCompRecs[i].split("~"); // parse each record
  2254.         if ( i > 0 ) { // if not first one
  2255.              CompIdLupArr += ","; // Computer Id Array
  2256.         }
  2257.         CompIdLupArr += warr1[2]; // Computer Id Array
  2258.     }
  2259.     if ( CountOfCompsRcvd > 0 ) {
  2260.         MaxCmpCount = CountOfCompsRcvd;
  2261.         SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : "";
  2262.         Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  2263.         Tops += "<tr><td width='5'> </td>";
  2264.         Tops += "<td width='19' align='center'><img src='images/snmp_sm.gif' width='16' height='16'></td>";
  2265.         Tops += "<td width='*' class='optext'>SNMPTrapWatch</td>";
  2266.         Tops += "</tr></table>";
  2267.         CountOfComps = 0; // initialize
  2268.         ALupMode = "EventPopIn";
  2269.         processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions
  2270.     }
  2271.     else {
  2272.         ALMode = ""; // reset mode
  2273.         top.Rstatus.Pstat("No associated computers found for this SNMPTrapWatch alert",true);
  2274.     }
  2275. }    
  2276.  
  2277. function processPopulateInputObject(ON,OD,OA) {
  2278.     /* Format Output */
  2279.     CurObjName = ON; // save Object name
  2280.     CurObjDesc = OD;
  2281.     Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  2282.     Tops += "<tr><td width='5'> </td>";
  2283.     Tops += "<td width='19' align='center'><img src='images/Objects.gif' width='16' height='16' style='cursor:hand' title='";
  2284.     Tops += OD + "'></td>";
  2285.     Tops += "<td width='*' class='optext'>" + ON + "</td>";
  2286.     Tops += "</tr></table>";
  2287. }
  2288.  
  2289. function processPopulateInputObjectOpComplete() {
  2290.     if ( PopUpDiv.style.display == "none" )
  2291.         return; // exit if Configure Window no longer present
  2292.     /* Lookup Counter Name and Description */
  2293.     if ( RpmCC_VA.CounterLookupForObjCntrArray("CounterID,"+CurCntrID) ) {
  2294.         top.Rstatus.Pstat("Unable to start the Counter LOOKUP request",true);
  2295.         ALupMode = ""; // reset
  2296.     }
  2297.     else {
  2298.         CurCntrName = "";
  2299.         VA_CommBusy = 1; // set Comm busy flag
  2300.         top.Rstatus.Pstat("One moment while Counter LOOKUP request completes");
  2301.     }
  2302. }
  2303.  
  2304. var CountOfComps = 0;
  2305. var MaxCmpCount = 0;
  2306. var CompIdLupArr = "";
  2307. function processPopulateInputCounter(CntrNme,CntrDesc,OCA) {
  2308.     if ( CurCntrName != "" || PopUpDiv.style.display == "none" ) {
  2309.           return; 
  2310.     }
  2311.     var WrkArr = new Array(); // working array
  2312.     WrkArr = OCA.split(";"); 
  2313.     WrkArr = WrkArr[0].split(","); 
  2314.     if (CurCntrID != WrkArr[1]) { // Is this CounterID looking for?
  2315.         return; // no, skip it
  2316.     }
  2317.     CurCntrName = CntrNme; // Cuurent Open Counter
  2318.     WrkArr = CntrDesc.split("'");
  2319.     CntrDesc = WrkArr.join("`");
  2320.     CurCntrDesc = CntrDesc;
  2321.     /* Format Counter Name and Description */
  2322.     Tops += "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  2323.     Tops += "<tr><td width='19' height='20' align='right'><img src='images/L.gif' width='19' height='20'></td>";
  2324.     Tops += "<td width='20' align='center'><img src='images/Counter.gif' width='17' height='16' style='cursor:hand' title='";
  2325.     Tops += CntrDesc + "'></td>";
  2326.     Tops += "<td width='*'  class='optext' >" + CntrNme + "</td>";
  2327.     Tops += "</tr></table>";
  2328.  
  2329.     /* Compute Array of Computer IDs */
  2330.     CompIdLupArr = ""; // Computer Id Array
  2331.     MaxCmpCount = --OCArray.length; // adjust for null last entry
  2332.     SBObj.style.overflow = ( MaxCmpCount > 3 ) ? "scroll" : "";
  2333.     for ( var i=0; i<MaxCmpCount; i++ ) {
  2334.     // get Computer ID from triplet of "CompId.ObjId,CntrId"
  2335.         WrkArr = OCArray[i].split(","); 
  2336.         if ( i > 0) {
  2337.            CompIdLupArr += ","; // array id separator
  2338.         }
  2339.         CompIdLupArr += WrkArr[0];
  2340.     }
  2341. }
  2342.  
  2343. /* OpComplete for the CounterLookupForObjCounterArray */
  2344. function processPopulateInputCounterOpComplete() {
  2345.     if ( PopUpDiv.style.display == "none" )
  2346.         return; // exit if Configure Window no longer present
  2347.     /* Lookup Computer Names and Descriptions */
  2348.     if ( RpmCC_VA.ComputerLookupByIDArray(CompIdLupArr) ) {
  2349.         top.Rstatus.Pstat("Unable to start the Computer LOOKUP request",true);
  2350.         ALupMode = ""; // reset
  2351.     }
  2352.     else {
  2353.         VA_CommBusy = 1; // set Comm busy flag
  2354.         CountOfComps = 0; 
  2355.         top.Rstatus.Pstat("One moment while lookup request completes");
  2356.     }
  2357. }
  2358.  
  2359. function processPopulateInputComputer(Cid,CmpNme,CmpDesc) {
  2360.     if ( PopUpDiv.style.display == "none" )
  2361.         return; // exit if Configure Window no longer present
  2362.     /* Format Computer Name and Description */
  2363.         if ( CountOfComps+1 == MaxCmpCount ) { // if Last Computer for Display
  2364.            lineGIF = "L";
  2365.         }
  2366.         else {
  2367.              lineGIF = "T";
  2368.         } 
  2369.         /* if using from Filter Entry, determine if Checked */
  2370.         CkdS = "' checked='0' src='images/Unchecked.gif'"; // default
  2371.         var CImg = "Computer";
  2372.         if ( CkCArr.length > 0 ) { // if from Filter
  2373.             for ( var i=0; i<CkCArr.length; i++ ) {
  2374.                 if ( Cid == CkCArr[i] ) { // if this matches a Checked one
  2375.                      break;
  2376.                 }
  2377.             }
  2378.             if ( i < CkCArr.length ) { // if match versus Checked Array of IDs
  2379.                 CkdS = "' checked='1' src='images/Checked.gif'";
  2380.                 CImg = "sViewAlerts";
  2381.             }
  2382.         }
  2383.         Tops += "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  2384.         Tops += "<tr><td width='39' height='20' align='right'><img src='images/" + lineGIF +".gif' width='19' height='20'></td>";
  2385.           Tops += "<td width='11' align='center'><img id='cmpa_" + CountOfComps;
  2386.           Tops += "' cmpid='" + Cid + CkdS;
  2387.           Tops += " style='cursor:hand' onclick='procCompImgClick(this)' width='9' height='9'></td>";
  2388.         Tops += "<td width='19' align='center'><img id='cmpb_" + CountOfComps;
  2389.         Tops += "' src='images/"+CImg+".gif' style='cursor:hand' onclick='procCompImgClick(this)' width='14' height='16' title='";
  2390.         Tops += CmpDesc + "'></td>";
  2391.         Tops += "<td width='*' class='"+CTparm+"'>" + CmpNme + "</td>";
  2392.         Tops += "</tr></table>";
  2393.         ++CountOfComps; // bump index
  2394. }
  2395.  
  2396. function processPopulateInputOpComplete() {
  2397.     /* Final Format and Output */
  2398.     if ( PopUpDiv.style.display == "none" )
  2399.         return; // exit if Configure Window no longer present
  2400.     ALupMode = ""; // reset
  2401.     SBObj.insertAdjacentHTML("beforeEnd",Tops);
  2402.  
  2403.     //DoneButton.className = "BoxButton"; // enable button
  2404.     DoneButton.disabled = ""; // enable button
  2405.     if ( CurrentAlertType != "U" ) {
  2406.         setSelectAll(true); // enable Select/UnselectAll buttons
  2407.     }
  2408.     SetCursor("auto");    
  2409.     if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") {
  2410.         top.Rstatus.Pstat("Request Completed");
  2411.  
  2412.         AL_AlertSel.focus(); // restore focus
  2413.     }
  2414. }
  2415.  
  2416. function procUsrAltClick(CObj) {
  2417.     if ( CObj.id != "usralt0" ) 
  2418.                 return;
  2419.     if ( CObj.checked == "1" ) { // if currently Checked, Uncheck
  2420.         usralt1.src = "images/Unchecked.gif";
  2421.        CObj.checked = "0"; // Set Unchecked
  2422.    }
  2423.     else { // otherwise Check
  2424.         usralt1.src = "images/Checked.gif";
  2425.        CObj.checked = "1"; // Set Checked
  2426.     }
  2427.     processApplyButton();
  2428. }
  2429.  
  2430. /* Process Click on Computer Image */
  2431. function procCompImgClick(COb) {
  2432.     isx = COb.id;  
  2433.     if ( isx.charAt(0) != "c" ) // if not a "cmpa_xx"
  2434.                 return;
  2435.     var cx = isx.substring(5,isx.length); // Strip off index
  2436.     CObj = document.all["cmpa_"+cx]; // Clicked Computer Entry
  2437.     var CIObj = document.all["cmpb_"+cx]; // Clicked Computer Entry Image
  2438.     
  2439.     if ( CObj.checked == "1" ) { // if currently Checked, Uncheck
  2440.         CObj.src = "images/Unchecked.gif";
  2441.        CObj.checked = "0"; // Set Unchecked
  2442.        CIObj.src = "images/Computer.gif";
  2443.    }
  2444.     else { // otherwise Check
  2445.         if ( CTparm == "optextr" ) { // if Suspended, don't add to filter
  2446.             top.Rstatus.Pstat("Alert is currently Suspended",true);    
  2447.             if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") {
  2448.                 AL_AlertSel.focus(); // restore focus
  2449.             }
  2450.             return;
  2451.         }
  2452.         CObj.src = "images/Checked.gif";
  2453.        CObj.checked = "1"; // Set Checked
  2454.        CIObj.src = "images/sViewAlerts.gif";
  2455.     }
  2456.     if ( arguments.length == 1 ) {
  2457.         processApplyButton();
  2458.     }
  2459. }
  2460.  
  2461. /* Process DB Error in Alert Lookup Operation */
  2462. function processAlertEventOpError() {
  2463.     top.Rstatus.Pstat("An error occurred during Alert Event LOOKUP operation",true);
  2464. }
  2465.  
  2466. // Process Serverices LOOKUP Record Event
  2467. var ServicesRecLength = 4; // Services Lookup record length
  2468. var AC_ServicesStoreArr = new Array();
  2469. function processServicesRecord(SRVstrg) {
  2470.     var warr = new Array();
  2471.     warr = SRVstrg.split("~");
  2472.     var j = ServicesRecCount * ServicesRecLength;
  2473.      AC_ServicesStoreArr[j] = warr[1]; // Computer ID
  2474.       AC_ServicesStoreArr[j+1] = warr[2]; // AlertGroup ID
  2475.       warr[3] = (warr[3] == "SQLCONNECT") ? "SQL" : warr[3];
  2476.       AC_ServicesStoreArr[j+2] = warr[3]; // Type
  2477.       AC_ServicesStoreArr[j+3] = SRVstrg; 
  2478.     ++ServicesRecCount; // bump record counter    
  2479. }
  2480.  
  2481. // Prcoess Services Operation Complete Event
  2482. function processServicesOpComplete() {
  2483.     if ( ALupMode == "ServicesLookup" ) {
  2484.         CommObj = RpmCC_VA; 
  2485.         ALupMode = "WinServicesLookup";
  2486.         WinServicesArr.length = 0; // reset Array
  2487.         rstat = RpmCC_VA.NTServicesListLookupId("0");    
  2488.         if ( rstat ) { // if unable to initiate request        
  2489.             top.Rstatus.Pstat("Unable to start the Win Services LOOKUP request",true);
  2490.             return;    
  2491.         }
  2492.         else { // waiting for OperationCompleteEvent
  2493.             top.Rstatus.Pstat("One moment while Win Services LOOKUP request completes");
  2494.         }
  2495.     }
  2496. }
  2497. var WinServicesArr = new Array();
  2498. var WinServicesArrEntrySz = 5;
  2499. function processWinServicesLookup(WinSvcs) {
  2500.     WinServicesArr = WinSvcs.split("~"); // parse out the Win Services
  2501.     WinServicesLUPreqd = false;
  2502.     processWinServicesOpComplete(); // Go get the Trap Monitors
  2503. }
  2504.  
  2505.     
  2506. function processWinServicesOpComplete() {
  2507.     if ( ALupMode == "WinServicesLookup" ) {
  2508.         // Do TrapMonitor Record Lookup
  2509.         ALupMode = "TrapMonitorLookup";
  2510.         rstat = RpmCC_VA.EnumSnmpTrapMonitor();    
  2511.         if ( rstat ) { // if unable to initiate request    
  2512.             ALupMode = ""; // reset
  2513.             top.Rstatus.Pstat("Unable to start the SNMP Trap LOOKUP request",true);
  2514.         }
  2515.         else { // waiting for OperationCompleteEvent
  2516.             top.Rstatus.Pstat("One moment while SNMP Trap LOOKUP request completes");
  2517.             return;
  2518.         }
  2519.      }
  2520. }
  2521. var TrapMonRecSize = 3;
  2522. function processEnumSnmpTrapMonitor(TMstrg) {
  2523.     var warr = new Array();
  2524.     var warr1 = new Array();
  2525.     // If done reading all records
  2526.     if ( TMstrg == "Done" ) {
  2527.         procOIDLookup(); // go lookup OID definitions
  2528.     }
  2529.     else {
  2530.         // Check if error
  2531.         warr1 = TMstrg.split(":");
  2532.         if ( warr1[0] == "Err" ) {
  2533.              top.Rstatus.Pstat("Error reading SNMP Trap Monitor records. "+TMstrg);
  2534.              return;
  2535.          }
  2536.          // Otherwise, process record
  2537.         else {
  2538.             warr = TMstrg.split("~");
  2539.               addElementToSelect(AC_TrapMonitorStore,warr[0]); // TrapMonitor ID
  2540.              addElementToSelect(AC_TrapMonitorStore,warr[2]); // Computer ID
  2541.               addElementToSelect(AC_TrapMonitorStore,warr[3]); // AlertGroup ID
  2542.           }
  2543.       }
  2544. }
  2545. function procOIDLookup() {
  2546.     // Get OID definitions
  2547.     if ( RpmCC_VA.EnumOidDefs() ) { // if unable to initiate request        
  2548.         top.Rstatus.Pstat("Unable to start the OID LOOKUP request",true);
  2549.         processResetButton();    
  2550.     }
  2551.     else { // waiting for OperationCompleteEvent
  2552.         top.Rstatus.Pstat("One moment while OID LOOKUP request completes");
  2553.     }
  2554. }
  2555. var gOIDstrg = "";
  2556. var gOIDarray = new Array();
  2557. function processOIDLookupRecord(OIDstrg) {
  2558.     gOIDstrg = OIDstrg; // save
  2559.     gOIDarray = OIDstrg.split("~"); // parse
  2560.     AL_AlertSel.style.display = ""; // compnesate for IE 5.5 bug; see "hideAlertSel()" below
  2561.     
  2562.     // Done
  2563.     ALupMode = "";
  2564.       processResetButton();            
  2565.       //ConfigButton.className = "BoxButton"; // enable button
  2566.       ConfigButton.disabled = ""; // enable button   
  2567.       //ViewCurrentButton.className = "BoxButton"; // enable button
  2568.       ViewCurrentButton.disabled = ""; // enable button   
  2569.     top.Rstatus.Pstat("Request Completed");
  2570.     processValidateFilter(); // go validate the Alert Filter
  2571.     processAccumulatedAlerts(); // go process the accumulated Alerts
  2572.     top.banner.processStopCommX(); 
  2573.     Tid = setTimeout("hideAlertSel()",50); // Delay 50 ms. then try to hide AlertSel
  2574. }
  2575. // compensate for IE 5.x bug
  2576. function hideAlertSel() {
  2577.     Tid = null;
  2578.     AL_AlertSel.style.display = "none";
  2579. }
  2580.  
  2581. function getOIDName(coid) {
  2582.     for ( var i=0; i<gOIDarray.length-1; i+=4 ) {
  2583.         if ( gOIDarray[i+2] == coid ) { // if match
  2584.             return gOIDarray[i+1];    
  2585.         }
  2586.     }
  2587.     return coid;
  2588. }
  2589.  
  2590. // Add Computer to Store if Not Already
  2591. var CompRecLength = 3;
  2592. function processCompAddToStore(CNme,CDesc,Cid) {
  2593.     for ( var i=0; i<AC_CompStoreArr.length; i+=CompRecLength ) {
  2594.         if ( Cid == AC_CompStoreArr[i] ) { // if in Store, skip it
  2595.             return;
  2596.         }
  2597.     }
  2598.     // Not in Store, Add now
  2599.     AC_CompStoreArr[i++] = Cid; 
  2600.     AC_CompStoreArr[i++] = CNme; 
  2601.     AC_CompStoreArr[i] = CDesc; 
  2602. }
  2603. var curCompDesc = "";
  2604. function getCompNameDesc(CompID) {
  2605.     for ( var i=0; i<AC_CompStoreArr.length; i+=CompRecLength ) {
  2606.         if ( CompID == AC_CompStoreArr[i] ) { // if in Store
  2607.             // save Computer Name and Description
  2608.             curServAlertCompDesc = AC_CompStoreArr[i+2];
  2609.             curServAlertCompNme = AC_CompStoreArr[i+1]; 
  2610.             return true;
  2611.         }
  2612.     }
  2613.     return false;
  2614. }
  2615.  
  2616. // Process to Toggle the Hide and Show of the Banner & Menu Frames
  2617. var hideToggle = 0;
  2618. var TitleDivSize = 100;
  2619. function processBannerMenu() {
  2620.     if ( hideToggle == 0 ) {
  2621.         top.BannerMenuHide(); hideToggle = 1;   
  2622.         ViewAlertsTitleDiv.style.display = "none"; 
  2623.         TitleDivSize = 56; 
  2624.     }
  2625.     else {
  2626.         top.BannerMenuShow(); hideToggle = 0;   
  2627.         ViewAlertsTitleDiv.style.display = "";  
  2628.         TitleDivSize = 100;
  2629.     }   
  2630. }
  2631.  
  2632. // Process SelectALL or UnselectALL
  2633. function processSelect(Pflg) {
  2634.     var CObj = null;
  2635.     for ( var j=0, i=0; j<CountOfComps; j++ ) {
  2636.         CObj = document.all["cmpa_"+j]; // computer entry in tree
  2637.         if (CObj.checked == Pflg) {
  2638.             procCompImgClick(CObj,true); // go process
  2639.             ++i; // bump number changed
  2640.         }
  2641.     }
  2642.     if ( i > 0 ) {
  2643.         processApplyButton();
  2644.     }
  2645.     if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") {
  2646.         AL_AlertSel.focus(); // restore focus
  2647.     }
  2648. }
  2649.     
  2650. // Null funcs
  2651. function    processResetButton() { 
  2652.     top.banner.processStopCommX(); 
  2653. }
  2654. function    checkEnableSchedButton() { 
  2655. }
  2656.  
  2657. function PopUpContextOpen() {
  2658.     AL_AlertSel.style.visibility = "hidden";
  2659. }
  2660. function PopUpContextClose() {
  2661.     AL_AlertSel.style.visibility = "visible";
  2662. }
  2663.  
  2664. function GetFileCheckStatus(fcstat) {
  2665.     var csStatusParm="", csStatusList="Status: ";
  2666.     var warr = new Array();
  2667.  
  2668.     var lStat = parseInt(fcstat, 10);
  2669.     csStatusList += (lStat & FILE_STRING_MATCH) ? "SearchString Match; " : "";
  2670.     csStatusList += (lStat & FILE_DATE_CHANGE) ? "Date Change; " : "";
  2671.     csStatusList += (lStat & FILE_SIZE_CHANGE) ? "Size Change; " : "";
  2672.     csStatusList += (lStat & FILE_SIZE_MAX) ? "Exist or MaxSize Exceeded; " : "";
  2673.     csStatusList += (lStat & FILE_DELETED) ? "Deleted; " : "";
  2674.     
  2675.     return csStatusList;
  2676. }
  2677.  
  2678. function GetProcessCheckStatus(fcstat) {
  2679.     var csStatusParm="", csStatusList="Status: ";
  2680.     var warr = new Array();
  2681.  
  2682.     var lStatus = parseInt(fcstat, 10);
  2683.     csStatusList += (lStatus & NOT_RUNNING_NO_RESTART) ? "Process Not Running; No Restart Attempted " : "";
  2684.     csStatusList += (lStatus & NOT_RUNNING_RESTARTED) ? "Process Not Running; Successfully Restarted " : "";
  2685.     csStatusList += (lStatus & NOT_RUNNING_RESTART_FAILED) ? "Process Not Running; Restart Failed " : "";
  2686.     csStatusList += (lStatus & RUNNING_HALTED) ? "Process Running; Terminated " : "";
  2687.     csStatusList += (lStatus & RUNNING_NOT_HALTED) ? "Process Running; No Terminate Attempt " : "";
  2688.     csStatusList += (lStatus & RUNNING_EXCEEDED_CPU) ? "Process Running & Exceeded CPU Threshold " : "";
  2689.     csStatusList += (lStatus & RUNNING_EXCEEDED_MEMORY) ? "Process Running & Exceeded a Memory Threshold " : "";
  2690.     csStatusList += (lStatus & RUNNING_EXCEEDED_CPU_HALTED) ? "Process Running & Exceeded CPU Threshold; Terminated " : "";
  2691.     csStatusList += (lStatus & RUNNING_EXCEEDED_MEMORY_HALTED) ? "Process Running & Exceeded a Memory Threshold; Terminated " : "";
  2692.  
  2693.     return csStatusList;
  2694. }
  2695.  
  2696. function GetFacility(FacCode)
  2697. {
  2698.     var csFacility;
  2699.     switch ( parseInt(FacCode) )
  2700.     {
  2701.     case 0: csFacility = "Kernel"; break;
  2702.     case 1: csFacility = "User-Level"; break;
  2703.     case 2: csFacility = "Mail System"; break;
  2704.     case 3: csFacility = "System Daemons"; break;
  2705.     case 4: csFacility = "Security/Authorization (4)"; break;
  2706.     case 5: csFacility = "Internal by Syslogd"; break;
  2707.     case 6: csFacility = "Line Printer Subsystem"; break;
  2708.     case 7: csFacility = "Network News Subsystem"; break;
  2709.     case 8: csFacility = "UUCP Subsystem"; break;
  2710.     case 9: csFacility = "Clock Daemon (9)"; break;
  2711.     case 10: csFacility = "Security/Authorization (10)"; break;
  2712.     case 11: csFacility = "FTP Daemon"; break;
  2713.     case 12: csFacility = "NTP Subsystem"; break;
  2714.     case 13: csFacility = "Log Audit"; break;
  2715.     case 14: csFacility = "Log Alert"; break;
  2716.     case 15: csFacility = "Clock Daemon (15)"; break;
  2717.     case 16: csFacility = "Local Use 0"; break;
  2718.     case 17: csFacility = "Local Use 1"; break;
  2719.     case 18: csFacility = "Local Use 2"; break;
  2720.     case 19: csFacility = "Local Use 3"; break;
  2721.     case 20: csFacility = "Local Use 4"; break;
  2722.     case 21: csFacility = "Local Use 5"; break;
  2723.     case 22: csFacility = "Local Use 6"; break;
  2724.     case 23: csFacility = "Local Use 7"; break;
  2725.     default:
  2726.         csFacility = FacCode;
  2727.     }
  2728.     return csFacility;
  2729. }
  2730.  
  2731. function GetSeverity(SevCode)
  2732. {
  2733.     var csSeverity;
  2734.     switch ( parseInt(SevCode,10) )
  2735.     {
  2736.     case 0: csSeverity = "Emergency"; break;
  2737.     case 1: csSeverity = "Alert"; break;
  2738.     case 2: csSeverity = "Critical"; break;
  2739.     case 3: csSeverity = "Error"; break;
  2740.     case 4: csSeverity = "Warning"; break;
  2741.     case 5: csSeverity = "Notice"; break;
  2742.     case 6: csSeverity = "Informational"; break;
  2743.     case 7: csSeverity = "Debug"; break;
  2744.     default:
  2745.         csSeverity = SevCode;
  2746.     }
  2747.     return csSeverity;
  2748. }
  2749.  
  2750. //-->
  2751. </script>
  2752.  
  2753. <script LANGUAGE="JAVASCRIPT" SRC="js/Calendar.js" PURPOSE="COMPONENT" CLASSNAME="com.netobjects.Calendar"></script>
  2754. <script LANGUAGE="JavaScript" src="js/MiscFunc.js"></script>
  2755. <script LANGUAGE="JavaScript" src="js/ButtonFunc.js"></script>
  2756. <script LANGUAGE="JavaScript" src="js/CalendarTimeFunc.js"></script>
  2757. <script LANGUAGE="JavaScript" src="js/AlertFunc.js"></script>
  2758. <script LANGUAGE="JavaScript" src="js/WinServicesFunc.js"></script>
  2759.  
  2760. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="Connected()">
  2761. <!--
  2762. processConnectConfirmed();
  2763. //-->
  2764. </script> 
  2765.  
  2766. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="DBChanged(cdata)">
  2767. <!--
  2768. var warr = new Array();
  2769. warr = cdata.split("~"); // parse the event data
  2770. // Ignore if Server Table change
  2771. if ( warr[0] == "4" ) 
  2772.     return; // ignore
  2773. top.Rstatus.StatDB.style.display = "";
  2774. if ( CTid == null ) {
  2775.     CTid = setTimeout("processDBChanged()",30000); // Delay 30 secs then process
  2776. }
  2777. //-->
  2778. </script>
  2779.  
  2780. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="Disconnected()">
  2781. <!--
  2782. top.Rstatus.Pstat("Disconnected",true);
  2783. if ( Tid != null ) {
  2784.     clearTimeout(Tid); // stop timeout routine
  2785. }
  2786. Tid = setTimeout("processReconnect()",10000); // Delay 10 secs then try reconnnect
  2787. //-->
  2788. </script>
  2789.  
  2790. <script FOR="RpmCC_VA" EVENT="ServicesRecord(SRVstrg)">
  2791. <!--
  2792. processServicesRecord(SRVstrg);
  2793. //-->
  2794. </script>
  2795. <script FOR="RpmCC_VA" EVENT="ServicesOpComplete()">
  2796. <!--
  2797. processServicesOpComplete();
  2798. //-->
  2799. </script> 
  2800. <script FOR="RpmCC_VA" EVENT="ServicesOpError()">
  2801. <!--
  2802. processServicesOpError();
  2803. //-->
  2804. </script>
  2805. <script FOR="RpmCC_VA" EVENT="AlertServicesLogRecord(LogRecStrg)">
  2806. <!--
  2807. MRLogRecID = null; // clear Log Record ID
  2808. processAlertServicesLogRecord(LogRecStrg);
  2809. //-->
  2810. </script>
  2811.  
  2812. <script FOR="RpmCC_VA" EVENT="AlertServicesLogOpError()">
  2813. <!--
  2814. //top.Rstatus.Pstat("Services Log Record Get Error",true);
  2815. //alert("AlertServicesLogOpError()");
  2816. //if ( MRLogRecID != null ) {
  2817.     // retry Record Get 
  2818.     //RpmCC_VA.ServicesLogGetRecord(MRLogRecID);
  2819.     //MRLogRecID = null;
  2820. //}
  2821. //-->
  2822. </script>
  2823.  
  2824. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ProcessCheckLogLookup(FCLogRec)">
  2825. <!--
  2826. processAlertProcessCheckRecord(FCLogRec);
  2827. //-->
  2828. </script> 
  2829.  
  2830. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ProcessCheckLookup(FCLStat)">
  2831. <!--
  2832. processPCLookupOpComplete(FCLStat);
  2833. //-->
  2834. </script> 
  2835.  
  2836. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="FileCheckLogLookup(FCLogRec)">
  2837. <!--
  2838. processAlertFileCheckRecord(FCLogRec);
  2839. //-->
  2840. </script> 
  2841.  
  2842. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="FileCheckLookup(FCLStat)">
  2843. <!--
  2844. processFCLookupOpComplete(FCLStat);
  2845. //-->
  2846. </script> 
  2847.  
  2848. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="SyslogCheckLogLookup(SLLogRec)">
  2849. <!--
  2850. processAlertSyslogCheckRecord(SLLogRec);
  2851. //-->
  2852. </script> 
  2853.  
  2854. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="SyslogCheckLookup(SLLStat)">
  2855. <!--
  2856. processSLLookupOpComplete(SLLStat);
  2857. //-->
  2858. </script> 
  2859.  
  2860. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="NTServicesLogLookup(WSLogRec)">
  2861. <!--
  2862. warr = new Array();
  2863. warr = WSLogRec.split("~");
  2864. // find available slot in pending array
  2865. for ( var i=0; i<WSAE_Arr.length; i+=WSAE_ArrRecLength ) {
  2866.     if ( WSAE_Arr[i] == 0 ) {
  2867.         break; // empty slot
  2868.     }
  2869. }
  2870. WSAE_Arr[i] = warr[0]; // NTServicesLog ID
  2871. WSAE_Arr[i+1] = warr[1]; // NTServicesMonitor ID
  2872. WSAE_Arr[i+2] = WSLogRec; // save string   
  2873. WSAE_Arr[i+3] = ""; // reserve for AGID
  2874. WSAE_Arr[i+4] = ""; // reserve for NTServicesLinkID
  2875. RpmCC_VA.NTServicesMonitorLookup(warr[1]); // read Monitor record
  2876. //-->
  2877. </script> 
  2878.  
  2879. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="NTServicesMonitorLookup(WSMonRec)">
  2880. <!--
  2881. var warr = new Array();
  2882. warr = WSMonRec.split("~");
  2883. for ( var i=0; i<WSAE_Arr.length; i+=WSAE_ArrRecLength ) {
  2884.     if ( WSAE_Arr[i+1] == warr[0] && WSAE_Arr[i+4] == "" ) { // Match on MonitorID 
  2885.         break; // found
  2886.     }
  2887. }
  2888. if ( i < WSAE_Arr.length ) {
  2889.     WSAE_Arr[i+4] = warr[2]; // save NTServicesLinkID
  2890.     WSAE_Arr[i+3] = warr[3]; // AGID
  2891.     ALupMode = ""; // reset
  2892.     RpmCC_VA.NTServicesLinkListLookupByID(warr[2]); // read NTServcicesLink record
  2893. }
  2894. //-->
  2895. </script> 
  2896.  
  2897. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="NTServicesLinkLookupByID(WSLIDrec)">
  2898. <!--
  2899. if ( ALupMode == "WSTComputerLookupPopIn" ) {
  2900.     processWServicesLinkIDLookupRecord(WSLIDrec);
  2901.     return;
  2902. }
  2903.  
  2904. var warr = new Array();
  2905. var warr0 = new Array();
  2906. warr = WSLIDrec.split("~");
  2907. for ( var i=0; i<WSAE_Arr.length; i+=WSAE_ArrRecLength ) {
  2908.     if ( WSAE_Arr[i+4] == warr[0] ) { // Match on NTServicesID
  2909.         break; // found
  2910.     }
  2911. }
  2912. if ( i < WSAE_Arr.length ) { // if match
  2913.     warr0 = WSAE_Arr[i+2].split("~"); // parse original log record
  2914.     warr0[1] = WSAE_Arr[i+3]; // Substitute AGID over the MonitorID
  2915.     var WSarec = warr0.join("~");
  2916.     WSarec += "~"+warr[2]+"~"+warr[1]; // Computer ID and Service ID
  2917.    processAlertWinServicesRecord(WSarec);
  2918.    // free up entry
  2919.    for ( var j=0; j<WSAE_ArrRecLength; j++ ) {
  2920.        WSAE_Arr[i+j] = 0; // free up slot
  2921.     }
  2922. }
  2923. // Reset Array if empty
  2924. for ( var i=0; i<WSAE_Arr.length; i+=WSAE_ArrRecLength ) {
  2925.     if ( WSAE_Arr[i] != 0 ) { // If in use
  2926.         break; // found
  2927.     }
  2928. }
  2929. if ( i >= WSAE_Arr.length ) { // if empty
  2930.     WSAE_Arr.length = 0;
  2931. }
  2932. //-->
  2933. </script> 
  2934.  
  2935. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="NTServicesListLookupId(WinSvcs)">
  2936. <!--
  2937. processWinServicesLookup(WinSvcs);
  2938. //-->
  2939. </script> 
  2940.  
  2941. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="NTServicesMonitorLookupAGID(WSTc)">
  2942. <!--
  2943. processPopulateWSTComputersContinue(WSTc);
  2944. //-->
  2945. </script> 
  2946.  
  2947.  
  2948.  
  2949. <script LANGUAGE="JavaScript" FOR="RpmCC_VA"
  2950. EVENT="AlertGroupLookupRecordPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs)">
  2951. <!--
  2952. AlertLupRecPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs);
  2953. //-->
  2954. </script>
  2955.  
  2956. <script LANGUAGE="JavaScript" FOR="RpmCC_VA"
  2957. EVENT="AlertGroupLookupRecordPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend)">
  2958. <!--
  2959. AlertLupRecPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend);
  2960. //-->
  2961. </script>
  2962.  
  2963. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupOpComplete()">
  2964. <!--
  2965. processAlertOpComplete();
  2966. VA_CommBusy = 0; // reset Comm busy flag
  2967. //-->
  2968. </script> 
  2969.  
  2970. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupOpError()">
  2971. <!--
  2972. processAlertOpError();
  2973. VA_CommBusy = 0; // reset Comm busy flag
  2974. //-->
  2975. </script> 
  2976.  
  2977. <script LANGUAGE="JavaScript" FOR="RpmCC_VA"
  2978. EVENT="AlertEventLookupRecord1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme)">
  2979. <!--
  2980. AlertEventLupRec1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme);
  2981. //-->
  2982. </script>
  2983.  
  2984. <script LANGUAGE="JavaScript" FOR="RpmCC_VA"
  2985. EVENT="AlertEventLookupRecord2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver)">
  2986. <!--
  2987. AlertEventLupRec2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver);
  2988. //-->
  2989. </script>
  2990.  
  2991. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertEventsOpComplete()">
  2992. <!--
  2993. processAlertEventOpComplete();
  2994. VA_CommBusy = 0; // reset Comm busy flag
  2995. //-->
  2996. </script> 
  2997.  
  2998. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertEventsOpError()">
  2999. <!--
  3000. processAlertEventOpError();
  3001. VA_CommBusy = 0; // reset Comm busy flag
  3002. //-->
  3003. </script> 
  3004.  
  3005. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ObjectLookupRecordObjCompArray(ON,OD,OA)">
  3006. <!--
  3007. processPopulateInputObject(ON,OD,OA);
  3008. //-->
  3009. </script> 
  3010.  
  3011. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ObjectOpComplete()">
  3012. <!--
  3013. processPopulateInputObjectOpComplete();
  3014. VA_CommBusy = 0; // reset Comm busy flag
  3015. //-->
  3016. </script> 
  3017.  
  3018. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ObjectOpError()">
  3019. <!--
  3020. processObjectOpError();
  3021. VA_CommBusy = 0; // reset Comm busy flag
  3022. //-->
  3023. </script> 
  3024.  
  3025. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="CounterLookupRecordObjCntrArray(CN,CD,OA)">
  3026. <!--
  3027. processPopulateInputCounter(CN,CD,OA);
  3028. //-->
  3029. </script> 
  3030.  
  3031. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="CounterOpComplete()">
  3032. <!--
  3033. processPopulateInputCounterOpComplete();
  3034. VA_CommBusy = 0; // reset Comm busy flag
  3035. //-->
  3036. </script> 
  3037.  
  3038. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="CounterOpError()">
  3039. <!--
  3040. processCounterOpError();
  3041. VA_CommBusy = 0; // reset Comm busy flag
  3042. //-->
  3043. </script> 
  3044.  
  3045. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerLookupRecord(Cid,Gid,SrvID,Nme,Desc,Pswd,OSVer,Addr,Port)">
  3046. <!--
  3047. processCompAddToStore(Nme,Desc,Cid);
  3048. if ( ALupMode == "UserAlertEvent" ) {
  3049.     processAlertUserComputerLookup(Cid,Nme,Desc);
  3050. }
  3051. else if ( ALupMode == "AlertEvent" ) {
  3052.     processAlertServicesComputerLookup(Cid,Nme,Desc);
  3053. }
  3054. else if ( ALupMode == "EventPopIn" ) {
  3055.     processPopulateInputComputer(Cid,Nme,Desc);
  3056. }
  3057. //-->
  3058. </script> 
  3059.  
  3060. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerOpComplete()">
  3061. <!--
  3062. if ( ALupMode == "EventPopIn" ) {
  3063.     processPopulateInputOpComplete();
  3064. }
  3065. VA_CommBusy = 0; // reset Comm busy flag
  3066. //-->
  3067. </script> 
  3068.  
  3069. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerOpError()">
  3070. <!--
  3071. processComputerOpError();
  3072. VA_CommBusy = 0; // reset Comm busy flag
  3073. //-->
  3074. </script> 
  3075.  
  3076. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="StartCommunication()">
  3077. <!--
  3078. top.banner.processStartComm();
  3079. //-->
  3080. </script> 
  3081.  
  3082. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="StopCommunication()">
  3083. <!--
  3084. top.banner.processStopComm();
  3085. //-->
  3086. </script> 
  3087.  
  3088. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ELMonitorOpComplete()">
  3089. <!--
  3090. VA_CommBusy = 0; // reset Comm busy flag
  3091. processELMonitorOpComplete();
  3092. //-->
  3093. </script> 
  3094.  
  3095. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ELMonitorOpError()">
  3096. <!--
  3097. VA_CommBusy = 0; // reset Comm busy flag
  3098. processELMonitorOpError();
  3099. //-->
  3100. </script> 
  3101.  
  3102. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="EventLogDataRecord(ELData)">
  3103. <!--
  3104. VA_CommBusy = 0; // reset Comm busy flag
  3105. processAlertEventLogRecord(ELData);
  3106. //-->
  3107. </script> 
  3108.  
  3109. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ELMonitorLookupRecord(ELCrec)">
  3110. <!--
  3111. VA_CommBusy = 0; // reset Comm busy flag
  3112. processELMonitorLookupRecord(ELCrec);
  3113. //-->
  3114. </script> 
  3115.  
  3116. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="EnumSnmpTrapMonitor(TMstrg)">
  3117. <!--
  3118. VA_CommBusy = 0; // reset Comm busy flag
  3119. processEnumSnmpTrapMonitor(TMstrg);
  3120. //-->
  3121. </script> 
  3122. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="SnmpTrapLogRecord(STLData)">
  3123. <!--
  3124. VA_CommBusy = 0; // reset Comm busy flag
  3125. processAlertSNMPRecord(STLData);
  3126. //-->
  3127. </script> 
  3128. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="SnmpTrapMonitorFindByAGId(coidstrg)">
  3129. <!--
  3130. processPopulateSNMPTrapComputerse(coidstrg);
  3131. //-->
  3132. </script> 
  3133. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="EnumOidDefs(ostrg)">
  3134. <!--
  3135. processOIDLookupRecord(ostrg);
  3136. //-->
  3137. </script> 
  3138.  
  3139.  
  3140.  
  3141.  
  3142. <script LANGUAGE="JavaScript" src="js/PopUpMenuFunc.js"></script>
  3143.  
  3144. <object ID="RpmCC_VA" NAME="RpmCC_VA" WIDTH="14" HEIGHT="1" style="display:none"
  3145. CLASSID="CLSID:D88C2358-FC83-11D1-BF49-00104B2D6F80" CODEBASE="controls/RPMComm.cab#version=5,2,0,0">
  3146.   <param name="_Version" value="65536">
  3147.   <param name="_ExtentX" value="2646">
  3148.   <param name="_ExtentY" value="1341">
  3149.   <param name="_StockProps" value="0">
  3150. </object>
  3151.  
  3152. <!-- Invisible Object to Support Simulated Click Event -->
  3153. <button id="FakeBut" style="display:none" onclick="top.banner.savePageCoord(event,document.body,'ViewAlerts')">
  3154. </button>
  3155.  
  3156. <!-- Define Images used in dynamic HTML generation to force loading and caching now -->
  3157. <div style="display:none">
  3158. <img src="images/sEventViewer.gif"><img src="images/Counter.gif"><img src="images/Unchecked.gif">
  3159. <img src="images/monitoritalert.gif"><img src="images/Computer.gif"><img src="images/L.gif">
  3160. <img src="images/Checked.gif"><img src="images/T.gif"><img src="images/Objects.gif">
  3161. <img src="images/sAdminServers.gif">
  3162. </div>
  3163.  
  3164.  <!-- PopUp to Prompt to Configure the Alert Filter -->
  3165.    <div id="PopUpDiv" class="PopUpBox" style="display:none; left:150; top:150; ">
  3166.    
  3167. <span id="ELogConfigLine" >
  3168. <center height="28" style="width:500; font-weight:800; font-size:10pt; background-color:graytext; color:captiontext" >Configure Alert Log Filter</center>
  3169.  <center><div class="EventConfig" id="ELogConfig" style="width:500px;" align="center">
  3170.  <table border="0" width="500" >
  3171.       <tr>
  3172.         <td width="90" align="right" class="inputlabel" height="32">Watch/Alert:</td>
  3173.             <td width="390" align="left" height="1">
  3174.             <select ONCHANGE="processAlertName()" SIZE="1" NAME="AL_AlertSel" id="AL_AlertSel" class="idis" style="width: 185pt" style="display: none"></select> 
  3175.             </td>
  3176.              <select SIZE="1" NAME="AC_TrapMonitorStore" style="display: none"></select>  
  3177.      </tr>
  3178.       <tr style="display:none">
  3179.         <td width="90" align="right" class="inputlabel" height="32">Start Date:</td>
  3180.           <td width="390" align="left" height="1"><input TYPE="text" SIZE="17" style="font-weight: 500" NAME="VA_StartDate" calendar="VA_calwin" CalObj="" onClick="this.blur(); processCalendarClick(this)" style="cursor:hand"> </td>
  3181.       </tr>
  3182.         <tr style="display:none">
  3183.         <td width="90" align="right" height="1"></td>
  3184.         <td width="390" align="left" height="1"><div class="CalendarTextBox" Name="VA_calwin" ID="VA_calwin" CalState="0" style="display: none"></div></td>
  3185.       </tr>
  3186.       
  3187.        <tr style="display:none">
  3188.        <td width="90" align="right" class="inputlabel" height="1">Stop Date:</td>
  3189.           <td width="390" align="left" height="1"><input TYPE="text" SIZE="17" style="font-weight: 500" NAME="VA_StopDate" onClick="this.blur(); processCalendarClick(this)" style="cursor:hand" CalObj="" calendar="VA_scalwin"></td>
  3190.       </tr>
  3191.         <tr style="display:none">
  3192.         <td width="90" align="right" height="1"></td>
  3193.         <td width="390" align="left" height="1"><div class="CalendarTextBox" Name="VA_scalwin" ID="VA_scalwin" CalState="0" style="display: none"></div></td>
  3194.       </tr>
  3195.    
  3196.       <tr>
  3197.         <td width="90" align="right" class="inputlabel" height="1">Selection(s):</td>
  3198.         <td width="390" align="left" height="1">
  3199.           <div id="VA_Select" class="VASelectBox"></div>
  3200.           </td>
  3201.       </tr>
  3202.     </table></div><table border="1" cellspacing="1" cellpadding="1" height="40" width="500">
  3203.    <tr><td colspan="2" align="center"><button onclick="processSelect('0')" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" style="width:80px; height:28px" id="bSelC" ><img src="images/selectall.gif" align="absmiddle" height="15" width="14">Select All</button>  <button onclick="processSelect('1')" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" style="width:93px; height:28px" id="bUselC" ><img src="images/unselectall.gif" align="absmiddle" height="15" width="14">Unselect All</button>  <button id="DoneButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Cancel and Hide the Configure Filter" style="width:70px; height:28px" onClick="processDoneButton()"><img src="images/CloseImg.gif" align="absmiddle" height="14" width="15"> Close</button></td></tr>
  3204.     </table></center></span>
  3205.     
  3206.        </div>
  3207.  <!-- End of PopUp to Prompt to Configure the Alert Filter -->
  3208.  
  3209.  
  3210.  
  3211. <center>
  3212.  
  3213.  <div id="VA_MainBox" class="VAMainBox" style="display:none">
  3214.  
  3215.   <div id="ViewAlertsTitleDiv"><table border="1"  borderColor="activeborder" align="left">
  3216.   <table border="1"  borderColor="activeborder" align="left">
  3217.     <tr><td borderColorDark="graytext" borderColorLight="white" style="font-weight:800; font-size:12pt; background-color:threedhighlight; color:windowtext"> <img src="images/sViewAlerts.gif" align="absmiddle" height="16" width="16"> Alert Watch Display </td></tr>
  3218. </table>
  3219. <BR CLEAR=ALL><HR align="left"></div>
  3220.  
  3221.  <!-- Alert Event Log Window -->
  3222. <center class="inputlabel">Alert Log</center>
  3223. <div class="EventLog" ID="ELogWin" style="width:99%" align="center"><span id="ELogText"></span><select SIZE="1" NAME="ELogParams" logeventid="" logtime="0" ELBgFlg=0 style="display: none"></select></div>
  3224.  <div style="height:0px; width:99%" align="center">
  3225.    <select SIZE="1" NAME="VA_EventStore" style="display: none"></select>
  3226.    <select SIZE="1" NAME="VA_ServEventStore" style="display: none"></select>
  3227.    <select SIZE="1" NAME="VA_UserEventStore" style="display: none"></select>
  3228.    <select SIZE="1" NAME="VA_CounterEventStore" style="display: none"></select>
  3229.    <table border="1" cellspacing="1" cellpadding="1" height="40" width="100%">
  3230.     <tr>
  3231.       <td width="15%" align="left" class="inputlabel"><span title="Uses the 'Asterisk' WAV assignment in Control Panel->Sounds & Multimedia Properties"><INPUT TYPE="checkbox" NAME="AlertAudioEnabled" id="AlertAudioEnabled" class="inputlabel" CHECKED>Audio Alert</span></td>
  3232.         <td align="center" width ="70%"><button id="ViewCurrentButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="View Filter for Alerts and associated Events displayed in the Event Log" style="width:90px; height:29px" onClick="processViewCurrentButton()" disabled><img src="images/OpenImg.gif" align="absmiddle" height="14" width="15"> View Filter</button> <button id="ConfigButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Configure Filter for Alerts and associated Events displayed in the Event Log" style="width:120px; height:29px" onClick="processConfigureButton()" disabled><img src="images/ConfigImg.gif" align="absmiddle" height="18" width="17">Configure Filter</button> <button id="ClearButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Clear the Event Log" style="width:90px; height:29px" onClick="processClearButton()" disabled><img src="images/unselectall.gif" align="absmiddle" height="15" width="14"> Clear Log</button> <button id="StatusPrintButton" title="Print AlertWatch Status Log" onclick="if (this.bdis == '0') processPrintStatus();" bdis="0" style="width:90px; height:29px" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" DISABLED><img src="images/Printer.gif" align="absmiddle" height="15" width="17"> Print</button></td>
  3233.      <td width="15%" align="right"><button onclick="processBannerMenu()" title="Press to Toggle Hide/Show of Menu and Banner Frames" style="cursor:hand"><img src="images/FullView.gif" align="absmiddle" height="16" width="16"></button></td></tr></table></div>
  3234.  
  3235.  
  3236.  
  3237.    
  3238. <!-- Alert Filter Window-->
  3239. <span id="ELogViewCurLine" style="display:none"><HR align="left">
  3240. <center class="inputlabel" >Alert Log Filter</center>
  3241.  <div class="EventFilter" ID="ELogViewCur" style="height:110px; width:530px; " align="center">
  3242.     <select SIZE="1" NAME="VA_FilterStore" style="display: none"></select>
  3243.         </div>
  3244.   <table border="1" cellspacing="1" cellpadding="1" height="40" width="40%">
  3245.    <tr><td align="center"><button id="VC_DeleteButton" disabled="disabled" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Delete the Selected Filter Entry and stop display of associated Events in the Event Log" style="width:100px; height:28px" onClick="processDeleteEntryButton()"><img src="images/DelImg.gif" align="absmiddle" height="14" width="14">Delete Entry</button>  <button style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Hide the Filter Display" style="width:100px; height:28px" onClick="processHideCurrentButton()"><img src="images/collapse.gif" align="absmiddle" height="14" width="16">Collapse</button></td></tr>
  3246.     </table></span>
  3247.  
  3248.   <!--<div style="height:3px; width:92%" align="center"></div>-->
  3249.  
  3250.  </center></div>
  3251.  
  3252. </center>
  3253. </body>
  3254. </html>
  3255.